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

chocolate cake problem

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
hi, I have a problem... in my server when I eat chocolate cake nothing happens like if it where a normal item...
how do I solve this?
 
I have an another problem how to I do a quest for only 1 vocation using this script?

function onUse(cid, item, frompos, item2, topos)
if item.actionid == 1200 then
queststatus = getPlayerStorageValue(cid,1200)
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid,22,'you have found a combat knife')
item_uid = doPlayerAddItem(cid,2404,1)
setPlayerStorageValue(cid,1200,1)

else
doPlayerSendTextMessage(cid,22,'It is empty')
end
else
return 0
end
return 1
end
 
I am not a master in lua and my tabbing is miserable (i think) xD
but try this one
combatknife.lua
Code:
function onUse(cid, item, frompos, item2, topos)


	if item.uid == 12000 then
[COLOR="Red"]	        if isKnight(cid) then[/COLOR]
 		                queststatus = getPlayerStorageValue(cid,20040)
 		                if queststatus == -1 then
 				       doPlayerSendTextMessage(cid,22,"You have found a Combat Knife.")
 				       doPlayerAddItem(cid,2404,1)
       		 	               setPlayerStorageValue(cid,20040,1)
 				else
 				doPlayerSendTextMessage(cid,22,"It is empty.")
 				end
		else
		doPlayerSendTextMessage(cid,22,"You don't have the right vocation.")
		end
	else
	return 0
	end

return 1
end

actions.xml
Code:
	<action uniqueid="12000" event="script" value="combatknife.lua"/>

You can edit this line
Code:
			if isKnight(cid) then
with
Code:
			if isSorcerer(cid) then
Code:
			if isPaladin(cid) then
Code:
			if isDruid(cid) then
or you just use the ID of that vocation in this line (X = put vocation id here)
Code:
        if getPlayerVocation(cid) == X then
 
Last edited:
yes it works thanks =)

also I have a problem with my vocations.xml

I edit the hpamount of the non vocation from 1 to 4 and its saved and all clear but when I open the server my character gain hp of 1 only.
why I have to do?
 
Back
Top