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

onWalk Experience Add Tile

Cdmar

New Member
Joined
Apr 20, 2008
Messages
15
Reaction score
0
Hello,

I would need a onWalk script for tile, which would add certain number of Experience points to the player who walks into this particular tile. This should work like the quest system, so that player can walk into a tile and it will add experience only once, when he walks into this tile again nothing should happen, not even a message appear - it should act like a regular ground tile by then. Number of EXP to add should be defined by item.uid.

Thanks in adance.

Kind Regards,
Cdmar.
 
Here is fix:
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	local config = {
		[2100] = {
			storageKey = 12000,
			experience = 1000000,
			messageType = MESSAGE_INFO_DESCR,
			message = "Congratulations! Bla blah..."
		},
		[2101] = {
			storageKey = 12001,
			experience = 1000,
			messageType = MESSAGE_INFO_DESCR,
			message = "Congratulations! Bla bla... 2!"
		}
	}
	local now = config[item.uid]
	if (getPlayerStorageValue(cid, now.storageKey) <= 0) then
		doPlayerAddExperience(cid, now.experience)
		doPlayerSendTextMessage(cid, now.messageType, now.message)
	end
	return true
end


Deleted my first post, i did not read the whole request :s
 
Back
Top