Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 09:16

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Tutorial] How to create Custom Monster AI

Reply
 
Old   #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



Hasi105 is offline  
Old   #17
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,695
Received Thanks: 5,147
Take a look at the AI files for Eternal, Huistaton, Gargadel, Luhiel.


nubness is offline  
Old   #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 *
Hasi105 is offline  
Old   #19
 
elite*gold: 0
Join Date: Sep 2011
Posts: 350
Received Thanks: 1,012
Did anybody find something about LuaRecallUser? Atleast, does anybody do tests about these except me?


JuuF is offline  
Old   #20
 
elite*gold: 0
Join Date: Nov 2012
Posts: 48
Received Thanks: 80
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
RealChew is offline  
Thanks
14 Users
Old   #21
 
elite*gold: 0
Join Date: Sep 2011
Posts: 350
Received Thanks: 1,012
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
JuuF is offline  
Old   #22
 
elite*gold: 0
Join Date: Jul 2009
Posts: 330
Received Thanks: 77
Fixed my issews thanx for the tut
Big_ is offline  
Old   #23
 
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 101
i have make this script, but not working anyone can help me please ?


Fixed
AxelMac is offline  
Old   #24
 
elite*gold: 0
Join Date: Jan 2013
Posts: 19
Received Thanks: 2
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?
Fordmondeo20 is offline  
Old   #25
 
elite*gold: 0
Join Date: Oct 2016
Posts: 21
Received Thanks: 1
Quote:
Originally Posted by RealChew View Post
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?
saler23 is offline  
Old   #26
I need some more coffee


 
elite*gold: 838
Join Date: Mar 2015
Posts: 280
Received Thanks: 790
Quote:
Originally Posted by saler23 View Post
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?
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
Cups is online now  
Thanks
4 Users
Old   #27
 
elite*gold: 0
Join Date: Oct 2016
Posts: 21
Received Thanks: 1
Quote:
Originally Posted by Cups​ View Post
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
saler23 is offline  
Old   #28
 
elite*gold: 0
Join Date: Jul 2010
Posts: 382
Received Thanks: 381
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):

sominus is offline  
Old   #29
 
elite*gold: 0
Join Date: Mar 2011
Posts: 40
Received Thanks: 14
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
kolin79 is offline  
Old   #30
 
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?


saler23 is offline  
Reply

Tags
ai, custom, monster, shaiya



« Previous Thread | Next Thread »

Similar Threads
[HELP] How do i create a custom interface?
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...
7 Replies - EO PServer Hosting
How do I create a custom server.dat?
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...
2 Replies - CO2 PServer - Discussions / Questions
How to create Custom Quests?
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...
3 Replies - Dekaron Private Server
create a website Custom
Hello, demo : http://img84.imageshack.us/img84/6397/testnp.pnghttp://img695.imageshack.us/img695/84/test2jh.png Good luck.
11 Replies - Shaiya PServer Development
Create monster
To generate a monster he is born only once, when dead not coming back?
5 Replies - EO PServer Hosting



All times are GMT +1. The time now is 09:16.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.