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 23:30

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

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.

Reply
 
Old 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
Hasi105 is offline  
Old 05/09/2014, 15:17   #17
 
nubness's Avatar
 
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.
nubness is offline  
Old 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 *
Hasi105 is offline  
Old 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?
JuuF is offline  
Old 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
RealChew is offline  
Thanks
18 Users
Old 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
JuuF is offline  
Old 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
Big_ is offline  
Old 01/16/2016, 11:24   #23
 
AxelMac's Avatar
 
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 ?


Fixed
AxelMac is offline  
Old 02/01/2017, 12:54   #24
 
Fordmondeo20's Avatar
 
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?
Fordmondeo20 is offline  
Old 04/26/2017, 23:46   #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 04/27/2017, 14:25   #26
 
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 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):

sominus is offline  
Old 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
kolin79 is offline  
Old 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?
saler23 is offline  
Old 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 ?!
mr.hellraven is offline  
Reply

Tags
ai, custom, monster, shaiya


Similar Threads 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 23:30.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.