|
You last visited: Today at 15:07
Advertisement
[Tutorial] How to create Custom Monster AI
Discussion on [Tutorial] How to create Custom Monster AI within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.
05/07/2014, 20:59
|
#16
|
elite*gold: 0
Join Date: Oct 2007
Posts: 5
Received Thanks: 0
|
How to use "LuaUpdateInsZonePortal" ... my portal in CS wont able to open with (1001, 0) or maybe i missed how to readout the portal id....
btw: How to disable / enable a portal?
pls tell me....ty
|
|
|
05/09/2014, 15:17
|
#17
|
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
|
Take a look at the AI files for Eternal, Huistaton, Gargadel, Luhiel.
|
|
|
05/09/2014, 16:47
|
#18
|
elite*gold: 0
Join Date: Oct 2007
Posts: 5
Received Thanks: 0
|
I know defeating one should open the gate.... but it doesnt.... thats why i dont know how to permanent open this gate
EDIT:
-Found the problem with perm open.....(in the 65.svmap / 66.svmap is the faciton number 1001) thats the problem ( set it to the faction and it works ) * my problem is solved now *
|
|
|
03/08/2015, 14:23
|
#19
|
elite*gold: 50
Join Date: Sep 2011
Posts: 408
Received Thanks: 1,262
|
Did anybody find something about LuaRecallUser? Atleast, does anybody do tests about these except me?
|
|
|
03/08/2015, 23:19
|
#20
|
elite*gold: 0
Join Date: Nov 2012
Posts: 49
Received Thanks: 97
|
Hi JuuF
Yep, i know how to use the LuaRecallUser.
LuaRecallUser can receive 6 args :
- The first is the Job of the toon (per example : 0 for Fighters and Warriors, 1 for Defenders and Guardians, ...).
- The second is the range in metters.
- The 3rd is the map (if missing, it will use automatically the map 0)
- 4th is the X coordinate value (optional)
- 5th is the Y coodinate value (optional)
- 6th is the Z coordinate value (optional)
Then, if you use :
Code:
Mob:LuaRecallUser(4, 100, 39, 65.000, 2.985, 67.000)
The mob will Recall all of Pagans/Mages within 100 metters area to the map 39 at X=65.000, Y=2.985 and Z=67.000
As i said, the coordinate value are optionals, if you just use :
Code:
Mob:LuaRecallUser(4, 100, 39)
The Pagans/Mage will be recall to the mob position.
Ofc, the mob must be in the map 39 in this case, or the pagans will be summon to this map.
And if you don't use the map arg, the toons will be summon to the map 0.
See you
|
|
|
03/09/2015, 08:23
|
#21
|
elite*gold: 50
Join Date: Sep 2011
Posts: 408
Received Thanks: 1,262
|
Thank you so much, this will be pretty enough for my tests. I was missing the 'job' column and after some disconnects i was about to give up. I really appreciate this. This will help me to solve most of my problems :P
|
|
|
05/09/2015, 04:20
|
#22
|
elite*gold: 0
Join Date: Jul 2009
Posts: 380
Received Thanks: 85
|
Fixed my issews thanx for the tut
|
|
|
01/16/2016, 11:24
|
#23
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
i have make this script, but not working  anyone can help me please ?
-- //////////////////////////////////////////////////////////////////////
-- 카일룸 사크라 보스 1차 보스 몬스터_ID-3083 AI 119.Lua ver.090513
-- //////////////////////////////////////////////////////////////////////
-- //////////////////////////////////////////////////////////////////////
Mob = LuaMob(CMob)
-- //////////////////////////////////////////////////////////////////
-- 사용자 변수는 여기에 선언합니다.
dwNextCreateTime = 0
bMobSay = 0
bMobCreate = 0
-- //////////////////////////////////////////////////////////////////
-- 사용자 함수는 여기에 선언합니다.
-- //////////////////////////////////////////////////////////////////
function Init()
end
-- //////////////////////////////////////////////////////////////////
function OnAttacked( dwTime, dwCharID )
end
-- //////////////////////////////////////////////////////////////////
function OnAttackable( dwTime, dwCharID )
end
-- //////////////////////////////////////////////////////////////////
function OnNormalReset( dwTime )
end
-- //////////////////////////////////////////////////////////////////
function OnDeath( dwTime, dwAttackedCount )
end
-- //////////////////////////////////////////////////////////////////
function OnReturnHome( dwTime, dwAttackedCount )
end
-- //////////////////////////////////////////////////////////////////
function OnMoveEnd( dwTime )
end
-- //////////////////////////////////////////////////////////////////
function WhileCombat( dwTime, dwHPPercent, dwAttackedCount )
if ( dwHPPercent <= 95 ) then
if ( bMobSay < 1) then
Mob:LuaSayByIndex ( 12001, 200.0 )
bMobSay = bMobSay + 1
end
end
if ( dwHPPercent <= 75 ) then
if ( bMobSay < 2) then
Mob:LuaSayByIndex ( 12002, 200.0 )
bMobSay = bMobSay + 1
end
Mob:LuaCreateMob ( 1251, 5, 0.0, 0.0 )
end
if ( dwHPPercent <= 25 ) then
if ( bMobSay < 4) then
Mob:LuaSayByIndex ( 12003, 200.0 )
bMobSay = bMobSay + 1
end
Mob:LuaCreateMob ( 1251, 5, 0.0, 0.0 )
Mob:LuaAttackAI ( 173 )
end
end
Fixed
|
|
|
02/01/2017, 12:54
|
#24
|
elite*gold: 0
Join Date: Jan 2013
Posts: 72
Received Thanks: 26
|
Hey, does anybody know how to select mobs which are created through the AI?
A negative example:
Code:
Guard1 = 0
Guard2 = 0
Guard3 = 0
function Init()
Guard1 = Mob:LuaCreateMob(68, 0, 20.73, 69.96)
Guard2 = Mob:LuaCreateMob(68, 0, 26.79, 75.66)
Guard3 = Mob:LuaCreateMob(68, 0, 35.35, 75.42)
end
Does it probably work with LuaGetMobUID in any way?
|
|
|
04/26/2017, 23:46
|
#25
|
elite*gold: 0
Join Date: Oct 2016
Posts: 21
Received Thanks: 1
|
Quote:
Originally Posted by RealChew
Hi JuuF
Yep, i know how to use the LuaRecallUser.
LuaRecallUser can receive 6 args :
- The first is the Job of the toon (per example : 0 for Fighters and Warriors, 1 for Defenders and Guardians, ...).
- The second is the range in metters.
- The 3rd is the map (if missing, it will use automatically the map 0)
- 4th is the X coordinate value (optional)
- 5th is the Y coodinate value (optional)
- 6th is the Z coordinate value (optional)
Then, if you use :
Code:
Mob:LuaRecallUser(4, 100, 39, 65.000, 2.985, 67.000)
The mob will Recall all of Pagans/Mages within 100 metters area to the map 39 at X=65.000, Y=2.985 and Z=67.000
As i said, the coordinate value are optionals, if you just use :
Code:
Mob:LuaRecallUser(4, 100, 39)
The Pagans/Mage will be recall to the mob position.
Ofc, the mob must be in the map 39 in this case, or the pagans will be summon to this map.
And if you don't use the map arg, the toons will be summon to the map 0.
See you 
|
only the coordinates are optional? what if we don't want to put the class and the range, and just summon everyone out from the map where the mob is?
|
|
|
04/27/2017, 14:25
|
#26
|
elite*gold: 0
Join Date: Oct 2016
Posts: 21
Received Thanks: 1
|
Quote:
Originally Posted by Cups
Well if there isn't a value for multiple classes (have you tried higher values?), then you could always just cheat and use a for loop.
Code:
-- The classes who will be teleported
local classes = {0, 2, 3}
-- Loop through the classes and teleport those specific
for _, class in pairs(classes) do
Mob:LuaRecallUser(class, -1, 39)
Mob:LuaRecallUser(class, math.huge, 39) -- You could try something like one of these if you didn't want to specify a range
end
|
Thanks for the help Cups, by the way, i've tried both, and it doesn't works, also, i've tried 2 others ways:
- for variable = 0, 5, 1 do
Mob:LuaRecallUser(variable, 100, 39)
end
- i = 0
while i <= 5 do
Mob:LuaRecallUser(i, 100, 39)
i = i + 1
end
but it doesn't work, doesn't summon anyone, but by adding the right class value, like Mob:LuaRecallUser(0, 100, 39) it summons out, but just the class i insert into the lua script... a bit stuck on it
|
|
|
04/27/2017, 21:35
|
#27
|
elite*gold: 0
Join Date: Jul 2010
Posts: 523
Received Thanks: 523
|
Try this:
Code:
while( iclass <= 5 )
do
Mob:LuaSay ('iclass '..iclass,50) --print iclass current value (for test)
Mob:LuaRecallUser(iclass, 10, 35)
iclass = iclass + 1
end
I don't know if you're using this in the ' WhileCombat' function. If so, keep in mind that using ' local iclass = 0' will reset the value to zero each time, reseting the loop.
You could just put ' iclass = 0' at the start of the script, before all the functions.
This is the sample used as a test (tested with a fighter only):
Code:
-- //////////////////////////////////////////////////////////////////////
-- test lua 190.lua - current MobID: 835
-- //////////////////////////////////////////////////////////////////////
Mob = LuaMob(CMob)
-- //////////////////////////////////////////////////////////////////
iclass = 0
-- //////////////////////////////////////////////////////////////////
function OnMoveEnd( dwTime )
end
-- //////////////////////////////////////////////////////////////////
function OnAttacked( dwTime, dwCharID )
end
-- //////////////////////////////////////////////////////////////////
function OnAttackable( dwTime, dwCharID )
end
-- //////////////////////////////////////////////////////////////////
function Init()
end
-- //////////////////////////////////////////////////////////////////
function OnNormalReset( dwTime )
end
-- //////////////////////////////////////////////////////////////////
function OnDeath( dwTime, dwAttackedCount )
end
-- //////////////////////////////////////////////////////////////////
function OnReturnHome( dwTime, dwAttackedCount )
end
-- //////////////////////////////////////////////////////////////////
function WhileCombat( dwTime, dwHPPercent, dwAttackedCount )
while( iclass <= 5 )
do
Mob:LuaSay ('iclass '..iclass,50) --print iclass current value
Mob:LuaRecallUser(iclass, 10, 35)
iclass = iclass + 1
end
end
--/////////////////////////////////////////////////////////////////////////
-- EOF
--/////////////////////////////////////////////////////////////////////////
|
|
|
04/27/2017, 23:56
|
#28
|
elite*gold: 0
Join Date: Mar 2011
Posts: 40
Received Thanks: 12
|
Add ai to any monster.
Then register the monster IDs you want to delete
Mob = LuaMob(CMob)
function Init()
--You can add as many monsters as you like
Mob:LuaDeleteMob ( 3005, 0, 0.0, 0.0, 500.0)
Mob:LuaDeleteMob ( 3006, 0, 0.0, 0.0, 500.0)
Mob:LuaDeleteMob ( 3007, 0, 0.0, 0.0, 500.0)
end
The monsters on the current map are deleted
Here spawn monsters for certain coordinates
Mob = LuaMob(CMob)
function OnDeath( dwTime, dwAttackedCount )
-- ID, number, x, z
Mob:LuaCreateMob(3015,1,150.0,535.0)
end
|
|
|
05/03/2017, 17:39
|
#29
|
elite*gold: 0
Join Date: Oct 2016
Posts: 21
Received Thanks: 1
|
i think i'm getting crazy, by the way, thanks everyone for the help, i fixed the summon script and it works pretty well now... but, i can swear i saw the function OnRespawn some days ago... just figured out how i have to build the script i need, and i can't find the OnRespawn function anymore... does it exists or i just dreamed it?
|
|
|
10/28/2017, 13:18
|
#30
|
elite*gold: 0
Join Date: Jun 2017
Posts: 69
Received Thanks: 6
|
bCharID = Mob:LuaGetMinAggro()
bCharName = Mob:LuaGetName( bCharID )
Mob:LuaSay( 'test ' .. bCharName .. ', are you afraid to die?', 20.0 )'
how to make them speak Russian ?!
|
|
|
 |
|
Similar Threads
|
[HELP] How do i create a custom interface?
09/04/2015 - EO PServer Hosting - 7 Replies
Hey guys ,
Im just wondering if you could tell me or link me a guide of how to create a custom interface for eudemons online because i have no idea and i think that you all could help me i've saw it before on a few other servers.
Thankyou from lewis :)
|
How do I create a custom server.dat?
12/07/2012 - CO2 Private Server - 2 Replies
Now I know I will probably be flamed, but I have searched through google and through the forums a plethora of times and have not found a straight answer for what I'm looking for.
Ok. So, I've been working on setting up a 5670 server and I used the official conquer client and patched it to the version I needed. And after I copied in the LoaderSet.ini and a cracked loader I still found that the servers were all the originals. So I set out to change the server.dat, but to my dismay, found that...
|
How to create Custom Quests?
05/27/2012 - Dekaron Private Server - 3 Replies
Just as the title says im looking into making some custom quests with custom rewards to add something different for the players.
What i wanna know is if it is exe hard coded or just csv and scripting.
I have looked into the files but did not see a control for the rewards.
If anybody knows how to do this can you please reply.
Thanks
Xesper
|
create a website Custom
03/17/2011 - Shaiya PServer Development - 11 Replies
Hello,
demo :
http://img84.imageshack.us/img84/6397/testnp.pnght tp://img695.imageshack.us/img695/84/test2jh.png
Good luck.
|
Create monster
09/20/2010 - EO PServer Hosting - 5 Replies
To generate a monster he is born only once, when dead not coming back?
|
All times are GMT +1. The time now is 15:09.
|
|