• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Simple but useful Quest System!

Nottinghster

Tibia World RPG Developer
Joined
Oct 24, 2007
Messages
1,618
Solutions
6
Reaction score
537
Location
Brazil - Rio de Janeiro
GitHub
Nottinghster
Hello OTLanders!

I was with nothing to do and decided to create a simple script, but useful, I created in about 3 minutes.

Code:
-- Quest System by Rodrigo (Nottinghster)
function onUse(cid, item, frompos, item2, topos)

config = {
number_code = 123
queststatus = getPlayerStorageValue(cid,number_code),
itemWeight = getItemWeightByID(item_weight_id, 1),
playerCap = getPlayerFreeCap(cid),
item_weight_id = 123
item_gain = '', -- item name here
container = '', -- container name here
}

if item.uid == config.number_code then
  if config.queststatus == -1 and getPlayerAccess(cid) == 0 then
	if config.playerCap >= config.itemWeight then
		doPlayerSendTextMessage(cid,22,'You have found a ' .. config.item_gain .. '.')
		--[[ YOUR CODE HERE ]]--
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. config.item_gain .. ' weighing ' .. config.itemWeight .. '.oz it\'s too heavy.')
	end	
  else
	doPlayerSendTextMessage(cid,22,"The ".. config.container .." is empty.")
  end
else
  return FALSE
end

return TRUE
end

Enjoy it ;]
 
Mmmmhhh... and you expect our "users" here to know exactly what to add here?
If I'd know what to write there I wouldn't bother using this script since I know already what to do :S

Anyway! Thanks for sharing, keep it up ^_^
 
Hello OTLanders!

I was with nothing to do and decided to create a simple script, but useful, I created in about 3 minutes.

Code:
-- Quest System by Rodrigo (Nottinghster)
function onUse(cid, item, frompos, item2, topos)

config = {
number_code = 123
queststatus = getPlayerStorageValue(cid,number_code),
itemWeight = getItemWeightByID(item_weight_id, 1),
playerCap = getPlayerFreeCap(cid),
item_weight_id = 123
item_gain = '', -- item name here
container = '', -- container name here
}

if item.uid == config.number_code then
  if config.queststatus == -1 and getPlayerAccess(cid) == 0 then
	if config.playerCap >= config.itemWeight then
		doPlayerSendTextMessage(cid,22,'You have found a ' .. config.item_gain .. '.')
		--[[ YOUR CODE HERE ]]--
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. config.item_gain .. ' weighing ' .. config.itemWeight .. '.oz it\'s too heavy.')
	end	
  else
	doPlayerSendTextMessage(cid,22,"The ".. config.container .." is empty.")
  end
else
  return FALSE
end

return TRUE
end

Enjoy it ;]


lolololol

and did u call it "system"? lol
and u will create 10000000000000 scripts for 1000000 quest, and u call it's system, lol
 
Don't be bad with him, he was trying to help, and so you should, if you think that the system have a problem or bug, notify to him and maybe he wil fix it up.
 
Back
Top