• 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!

Problem my onkill script

Massen

Masserv RPG
Joined
Jul 23, 2007
Messages
324
Reaction score
1
Location
Sweden
This script is suppose to send you the message "no storage store is "..store.." klar is "..klar.." aa." if you don't have storage value 100041. if you do and you kill a wolf then it will show you how many you killed until you killed 5 wolfs. after that it will tell you your done and give you storagevalue 10005 which indicates that you are done with the quest

creaturescripts.xml
Code:
	<event name="wolf_kill" type="kill" script="onkill.lua"/>

onkill.lua
Code:
function onKill(cid, corpse, killer)

local store = getPlayerStorageValue(killer, 100041)
local klar = getPlayerStorageValue(killer, 10005)


	if store >= 1 then
	 if store < 5 then
	  if klar == -1 then
		if(isPlayer(killer) == TRUE) then
			setPlayerStorageValue(killer,100041,store+1)
			doPlayerSendTextMessage(killer, 22, "You killed "..store.."/5 wolfs!")

		elseif store == 5 then
			doPlayerSendTextMessage(killer, 22, "You killed "..store.."/5 wolfs! Go back to get your reward!")
			setPlayerStorageValue(killer, 10005, 1)
		else
			doPlayerSendTextMessage(killer, 22, "no storage store is "..store.." klar is "..klar.." aa.")
		end
	end
end
return TRUE
end
end

in the wolf file i have

wolf.xml
Code:
<script>
<event name="wolf_kill"/>
</script>

Anyone know what might be wrong?

//Massen
 
Last edited:
Back
Top