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

Action Right click ---> remove frags.

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
Hello, i requested a script and someone posted it, it was talkaction but now i decided to make it to Action(onUse)

Here is it.

Credits -
slawkens script.
edited to onUse by Zonet ;)


-- credits
-- slawkens script edited by zonet to onUse


PHP:
local config =
{
	item = itemid,  -- itemid the item you right click on and reset your frags.
	level = 10,
	count = 1
}

function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= config.level then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your "..getPlayerRedSkullTicks(cid).." frags has been removed.")
		doRemoveItem(item.uid)
		doPlayerSetRedSkullTicks(cid, 0)
	else
		doPlayerSendCancel(cid, "You dot have enough level")
	end
	return TRUE
end

hope you like it.


Zonet, ;)


NOT TESTED
 
Last edited:
omg
Its 10 seconds :/ You only changed one line, so all credits goes to slwakens.

...but its still not working on tfs 0.2 beacouse of "doPlayerSetRedSkullTicks" :|
 
Man, his script didn't even work when you said !resetfrag.. i maked the problem.. it also worked but it didn't remove the item.

I didn't say anything? i told it is slawkens so why flaming? i maked this for people who want a onUse instead onSay?
 
I wrote it about month ago in XX minutes (ye I don't know LUA very well)
 
Im not sure, but:
Code:
doPlayerRemoveItem(cid, config.item, config.count)

If the player do not have the specified item it will print an error in the console?
 
how can you send an animated text with like 30 letters? 9 is max?
also, why would you want a config for your item? you have already specified the item in the xml.. total waste :p its not a bad script, but you should think a bit more before you decleare it as releaseable ;)

also, what happens if you put the item on the ground and click on it? you answer
 
@up

oooh didnt see, sorry.

*doRemoveItem(item.uid) (added).

*config.level (added)

*doSendAnimatedText(removed)

replaced doPlayerSendTextMessage over the doPlayerSetRedSkullTicks(cid, 0) so it says the frags before it removes and says Your 0 Frags will be removed.. now it will say how many frags you got.. that's why i replaced it before doPlayerSetRedSkullTciks before doPlayerSendTextMessage.

;)
 
Last edited:
i use TFS 0.2.i have problem:
Code:
[09/01/2009  18:43:12] Lua Script Error: [Action Interface] 
[09/01/2009  18:43:12] data/actions/scripts/removelist.lua:onUse

[09/01/2009  18:43:12] data/actions/scripts/removelist.lua:10: attempt to call global 'getPlayerRedSkullTicks' (a nil value)
[09/01/2009  18:43:12] stack traceback:
[09/01/2009  18:43:12] 	data/actions/scripts/removelist.lua:10: in function <data/actions/scripts/removelist.lua:8>

script only for TFS 0.3?
 
i use TFS 0.2.i have problem:
Code:
[09/01/2009  18:43:12] Lua Script Error: [Action Interface] 
[09/01/2009  18:43:12] data/actions/scripts/removelist.lua:onUse

[09/01/2009  18:43:12] data/actions/scripts/removelist.lua:10: attempt to call global 'getPlayerRedSkullTicks' (a nil value)
[09/01/2009  18:43:12] stack traceback:
[09/01/2009  18:43:12] 	data/actions/scripts/removelist.lua:10: in function <data/actions/scripts/removelist.lua:8>


script only for TFS 0.3?
Yep it is only for 0.3 cuz 0.2 dont got the function getPlayerRedSkullTicks
 
Back
Top