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 17:48

  • 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 10/28/2017, 14:19   #31
 
killer2p's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 417
Received Thanks: 159
Quote:
Mob:LuaSay( 'test ' .. bCharName .. ', are you afraid to die?', 20.0 )'
change the english to russian
killer2p is offline  
Thanks
1 User
Old 10/28/2017, 16:44   #32
 
elite*gold: 0
Join Date: Jun 2017
Posts: 69
Received Thanks: 6
hieroglyphs show symbolic when you use Russian
mr.hellraven is offline  
Old 10/28/2017, 17:38   #33
 
Velocity.'s Avatar
 
elite*gold: 0
Join Date: Jul 2016
Posts: 237
Received Thanks: 324
Quote:
Originally Posted by mr.hellraven View Post
hieroglyphs show symbolic when you use Russian
if it won't show up in game then i dont believe you can do it without modifying the game to allow russian characters, but then again i have never tried.
Velocity. is offline  
Old 10/28/2017, 18:49   #34
 
elite*gold: 0
Join Date: Dec 2011
Posts: 22
Received Thanks: 2
Quote:
Originally Posted by mr.hellraven View Post
bCharID = Mob:LuaGetMinAggro()
bCharName = Mob:LuaGetName( bCharID )
Mob:LuaSay( 'test ' .. bCharName .. ', are you afraid to die?', 20.0 )'

how to make them speak Russian ?!
Используй ID строки из файла sysmsg-uni.txt вместо прямого текста.

Use ID string in sysmsg-uni.txt.
ukrainec705 is offline  
Old 11/11/2019, 10:19   #35
 
LibPor22's Avatar
 
elite*gold: 0
Join Date: Apr 2019
Posts: 42
Received Thanks: 2
Is there any solution to detect the character class using lua ?
LibPor22 is offline  
Old 04/21/2020, 01:09   #36
 
elite*gold: 0
Join Date: Oct 2019
Posts: 10
Received Thanks: 0
hello, i have a question and i can't solve it, i want the boss to generate a wav file when i have 50% hp someone could help me please
DarKTaloco is offline  
Old 04/27/2020, 16:56   #37
 
LibPor22's Avatar
 
elite*gold: 0
Join Date: Apr 2019
Posts: 42
Received Thanks: 2
Talking

Quote:
Originally Posted by DarKTaloco View Post
hello, i have a question and i can't solve it, i want the boss to generate a wav file when i have 50% hp someone could help me please
If by "generate" you mean to play a certain file, it's simple:

Code:
function WhileCombat(dwTime, dwHPPercent, dwAttackedCount )
        if ( dwHPPercent == 50 ) then
        Mob:LuaSayByVoice('YOUR_FILE_NAME.wav', 1000)
        end
end
I don't know yet what values you have on your server but in case the hp jumps from 51 to 49 then the mob won't play it so you will need a statement that will play the file when the mob has the hp lower than 50% just one time:

EX:

Code:
local SwM1 = 0 -- add this at the beginning of your lua file
Code:
    -- 50
    if ( dwHPPercent <= 50) then
    if ( SwM1 == 0) then
        Mob:LuaSayByVoice('YOUR_FILE_NAME.wav', 1000)
        SwM1 = 1
    end
    end
If you followed nubness guide, then you will be good to go, this guy has a talent when it comes to explaining stuff.
LibPor22 is offline  
Thanks
1 User
Old 04/28/2020, 01:03   #38
 
elite*gold: 0
Join Date: Jul 2010
Posts: 523
Received Thanks: 523
And if it still doesn't play, try make the sound the same format shaiya client has:
22050Hz mono 16 bits
sominus is offline  
Thanks
1 User
Old 10/25/2022, 01:59   #39

 
IamOdin's Avatar
 
elite*gold: 0
Join Date: Aug 2021
Posts: 77
Received Thanks: 34
Can someone explain to me that mobs are not removed??


-- //////////////////////////////////////////////////////////////////////
-- 카일룸 사크라 보스 2차_분신 소환되기전 몬스터_ID-2470 AI 117.Lua ver.090113
-- //////////////////////////////////////////////////////////////////////



-- //////////////////////////////////////////////////////////////////////

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 )
Mob:LuaDeleteMob ( 1968, 5, 0.0, 0.0)
end

-- //////////////////////////////////////////////////////////////////
function OnReturnHome( dwTime, dwAttackedCount )

end

-- //////////////////////////////////////////////////////////////////
function OnMoveEnd( dwTime )

end

-- //////////////////////////////////////////////////////////////////
function WhileCombat( dwTime, dwHPPercent, dwAttackedCount )

-- 체력이 50% 가 될때 메세지를 출력 후 1초뒤 몬스터 소환
if ( dwHPPercent <= 90 ) then
if ( bMobSay == 0 ) then
-- 몬스터 생성시간은 메세지 출력 1초 후
dwNextCreateTime = dwTime + 1000
-- 메세지 출력
Mob:LuaSayByIndex ( 12000, 500.0 )
bMobSay = bMobSay + 1
end
if ( dwTime >= dwNextCreateTime ) and ( bMobCreate == 0 ) then
-- 몬스터 생성 2마리 소환
Mob:LuaCreateMob ( 1968, 1, 0.0, 0.0 )
Mob:LuaCreateMob ( 1968, 4, 0.0, 0.0 )

bMobCreate = bMobCreate + 1
end
if ( bMobCreate >= 1 ) then
Mob:LuaDeleteMob ( 1968, 5, 0.0, 0.0)
end
end
end
IamOdin is offline  
Old 10/26/2022, 18:36   #40
 
elite*gold: 0
Join Date: Oct 2022
Posts: 2
Received Thanks: 0
I got complete .lua files from OS with AI for dimension crack bosses,

the point is you nd to take deep thinking of how to create a new custom one

, I believe no one is gonna share this for you.
Kavin14 is offline  
Old 05/24/2023, 21:54   #41
 
elite*gold: 0
Join Date: Sep 2022
Posts: 32
Received Thanks: 20
Quote:
Originally Posted by Banhammer881 View Post
- i want to add boxes that spawn when kimu at 75% hp.
- kimu AI was 3 in db, changed it to 110.
- named my lua in PSM_Client\Bin\Data\Lua to 110.lua
- restarted server, updated monster.sdata, unicodetxt...
Nothing happens when killing kimu.

Code:
-- //////////////////////////////////////////////////////////////////////
-- Д«АП·л »зЕ©¶у єёЅє 2Вч_єРЅЕ јТИЇµЗ±вАь ёуЅєЕН_ID-835 AI 110.Lua  ver.090113
-- //////////////////////////////////////////////////////////////////////



-- //////////////////////////////////////////////////////////////////////

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 )
end

if ( dwHPPercent <= 75 ) then
if ( bMobSay < 2) then
        Mob:LuaSayByIndex ( 11006, 200.0 )
        bMobSay = bMobSay + 1
end
        Mob:LuaCreateMob ( 2385, 10, 0.0, 0.0 )
end
add me in discord Morningstar#0836
MorningstarV 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 17:49.


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.