Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 21:55

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

Advertisement



Nubness Custom Monster AI script (Error)

Discussion on Nubness Custom Monster AI script (Error) within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2012
Posts: 122
Received Thanks: 12
Nubness Custom Monster AI script (Error)

Hello Epvpers

Once again im here for my test server, I tryed out the Custom Monster AI release from Nubness. However of some dumb reason i cant get it too work, been scratching my head for hrs without success...

this is my error in the logs about the new .Lua.

.\Data\Lua\119.lua:61: attempt to compare number with nil

And it wont do the stuff i tell it too do. this is the lua it self:

Code:
 -- //////////////////////////////////////////////////////////////////////
-- 카일룸 사크라 보스 1차 보스 몬스터_ID-2821 AI 119.Lua  ver.090513
-- //////////////////////////////////////////////////////////////////////



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

Mob = LuaMob(CMob)

-- //////////////////////////////////////////////////////////////////
-- 사용자 변수는 여기에 선언합니다.


-- //////////////////////////////////////////////////////////////////
-- 사용자 함수는 여기에 선언합니다.



-- //////////////////////////////////////////////////////////////////
function Init()

end

-- //////////////////////////////////////////////////////////////////
function OnAttacked( dwTime, dwCharID )

end

-- //////////////////////////////////////////////////////////////////
function OnAttackable( dwTime, dwCharID )

end

-- //////////////////////////////////////////////////////////////////
function OnNormalReset( dwTime )


end

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

		Mob:LuaCreateMob( 2470,1,0.0,0.0 )
end

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

end

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

end


-- //////////////////////////////////////////////////////////////////
function WhileCombat( dwTime, dwHPPercent, dwAttackedCount )
end
if ( dwHPPercent >= 95 ) then
if ( bMobSay < 1) then
Mob:LuaSayByIndex ( 10130, 200.0 )
bMobSay = bMobSay + 1
end
end
if ( dwHPPercent <= 75 ) then
if ( bMobSay < 2) then
Mob:LuaSayByIndex ( 10130, 200.0 )
bMobSay = bMobSay + 1
end
Mob:LuaCreateMob ( 2803, 1, 0.0, 0.0 )
end
Thanks for the help!
Dotzie is offline  
Old 06/03/2017, 18:40   #2
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
You forgot to declare the variables.

Quote:
Originally Posted by nubness View Post
These 3 lines represent the initialization of 3 variables:
Code:
dwNextCreateTime = 0
bMobSay	= 0
bMobCreate = 0
nubness is offline  
Thanks
2 Users
Old 06/04/2017, 12:03   #3
 
elite*gold: 0
Join Date: Feb 2012
Posts: 122
Received Thanks: 12
Still gets the same error even after that.

If i remove the "end" at the beginning that closes the function it gives me an error of end missing too close it.

its giving me a headache lol
Dotzie is offline  
Old 06/04/2017, 12:22   #4
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
Just read one of the default scripts and try to follow the pattern.
nubness is offline  
Old 06/04/2017, 13:29   #5
 
elite*gold: 0
Join Date: Mar 2011
Posts: 28
Received Thanks: 24
Quote:
Originally Posted by Dotzie View Post
Still gets the same error even after that.

If i remove the "end" at the beginning that closes the function it gives me an error of end missing too close it.

its giving me a headache lol
That's because you don't need to remove it, you have to move it to the end. Don't forget to indent your code in the future to make it easier to read and find mistakes.
Grim. is offline  
Old 06/04/2017, 14:11   #6
 
elite*gold: 0
Join Date: Feb 2012
Posts: 122
Received Thanks: 12
Using the Dios Exile script and removing parts off it i got it too work.
however if i wish too make it spawn mobs by time like

starts at 10% hp and down to 0%? is there a simple way too do it or do i have too add a whole script per 1% hp?
Dotzie is offline  
Reply


Similar Threads Similar Threads
[CUSTOM SALE] PokeMMO! Custom Bots, Exp Leveling Bot, Shiny Catcher! [CUSTOM SALE]
04/08/2014 - Trading - 90 Replies
Update: 2013-05-20 BOT IS NOW FULLY AIO SUPPORTS ALL LOCATIONS IN POKEMMO!! Auto-leveling bot: Supports PP healing Supports Death pokemon healing Supports death pokemon switching Supports walking to healing Fully flawless & catches shinies!!!
Search a Unique Monster Kill Script / Suche ein Unique Monster Kill Script
06/23/2012 - Diablo 2 Programming - 2 Replies
Hello, a few Weeks ago ive seen a video on Youtube with a Bot Script (dont know its Name) that he will kill Champions / Unique Monsters on his way . I would like to add this Script to my Bot that I use right now ( Muddys D2NT) since this Bot fits the best to my wishes . So does someone know how to write such a Script and help me since i totally have no idea how to write Scripts (can only edit things):handsdown: . It would be awesome if the Bot runs from act 1 - 5 and kill only the Champ /...
[BETA]Beta-Max Online ~ 120 CAP ~ D13 ~ Custom Events ~ Custom Quests ~ Custom Areas
03/25/2012 - SRO PServer Advertising - 109 Replies
Hello there, I would like to announce the BETA opening of Astro Server, We are here for the community not for competition. We don't care if we are #1 or #1001. The BETA will last one week, to find any small bugs that may still exist. During this time users will receive 5000 Wonga as soon as you register this is part of the BETA test. Also users will be rewarded for helping when we go live, Which you can find more information on this at the forum. Please be aware after the BETA ends...
Beta-Max Online ~ 120 CAP ~ D13 ~ Custom Events ~ Custom Quests ~ Custom Areas
03/19/2012 - SRO PServer Advertising - 6 Replies
Fantastic Server. If reliablility is what you want then Beta-Max is for you. Unique PVP Battles - Pets - Items - Quests - Jobs - Wonga and so much more Server Details: Level Cap: 120 Skill Cap: 120 Chinese Mastery Cap: 360 European Mastery Cap: 240 Item Degree: 13th Degree Active Areas: All (Including Jupiter)



All times are GMT +1. The time now is 21:56.


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.