• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MoveEvent Creaturescript Arena

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
[Server used = Theforgotten server 0.2.7 Client 8.0]

Hello, I was looking for some help with a creaturescript to my server which is supposed to be to Svargrond arena.

Anyway, here is the script

function onKill(cid, target)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'Mozesz wejsc do kolejnego pokoju areny!')
end
end

And here is the console error:

[02/06/2009 17:55:01] Error: [CreatureEvent::configureEvent] No valid type for creature event.kill
[02/06/2009 17:55:01] Warning: [BaseEvents::loadFromXml] Can not configure event

If anyone knows what the problem might be, please post it here or send me a private message.

Thanks.
 
Lua:
function onKill(cid, target)
	local text = 'Mozesz wejsc do kolejnego pokoju areny!'

	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT, text)
	end
	return TRUE
end

Regards,
Shawak
 
Thanks, but it didn't work. I figure it might have to to with
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)

But since I don't know sh*t 'bout it, I've got no clue how to fix it:(
 
I don't think I've got the function "onKILL"
 
data/creaturescripts/creaturescripts.xml
Add before the "</creaturescripts>"
Lua:
	<event type="kill" name="MonsterKill" event="script" value="kill.lua"/>

After that, goto data/creaturescripts/scripts and create kill.lua

Lua:
function onKill(cid, target)
        local text = 'Mozesz wejsc do kolejnego pokoju areny!'
        
        local monster = getCreatureName(target)
        local room = getArenaMonsterIdByName(monster)

        if room > 0 then
                setPlayerStorageValue(cid, room, 1)
                doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT, text)
        end
        return TRUE
end

Regards,
Shawak
 
Last edited:
Thanks alot for helping but it still doesn't work haha, or perhaps... I'm not sure what you mean with
Add before the "</creaturescripts>"

I'll work on it

Thanks

Nevermind, I realized what you ment, haha. Well it didn't work:( Thanks anyway, if you figure it out, I'll be really thankfull. Thanks!
 
Last edited:
I was watching some other creaturescripts, some of them needs this in the monster files
<script>
<event name="Script"/>
</script>
 
I mean it so..
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="kill" name="PlayerKill" event="script" value="kill.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="kill" name="MonsterKill" event="script" value="kill.lua"/>
</creaturescripts>

I hope you understand it now.
 
Of course, and you should have alot of credits for helping, but unfortunately, it still doesn't seem to work. I get the same errors.
 
my.php
 
Don't know why I can't upload a picture but I simply can't lol nothings happends

ImageShack
 
You changed the creaturescripts.xml?

Yes, here is my creaturescript.xml:

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" script="login.lua"/>
<event type="logout" name="PlayerLogout" script="logout.lua"/>
<event type="death" name="PlayerDeath" script="playerdeath.lua"/>
<event type="login" name="FirstItems" script="firstitems.lua"/>
<event type="kill" name="MonsterKill" event="script" value="kill.lua"/>
</creaturescripts>
 
1. I don't know if the script work on 0.2.7

2. You have to write
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" script="login.lua"/>
	<event type="logout" name="PlayerLogout" script="logout.lua"/>
	<event type="death" name="PlayerDeath" script="playerdeath.lua"/>
	<event type="login" name="FirstItems" script="firstitems.lua"/>
	<event type="kill" name="MonsterKill" script="kill.lua"/>
</creaturescripts>
I forgot that you use TFS 0.2.7 ;)

Regards,
Shawak
 
Still doesn't work! :( The one who made this script (Geisor), said in his thread "Tested on theforgottenserver 0.2"
 
Then ask him ^_^.

I have but I didn't get any answers. But I don't know why, because now I found another bug that is following: Even though I make Warlord Arena, frostfur spawns and alot of random stuff
 
Back
Top