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

Teleport player when using pick?

Status
Not open for further replies.

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I'm trying to make an script that, when the player uses pick in an item, he get teleported to somewhere else, but I have no idea how can I set it to the script runs based on the pick use, u know? just know how to do it by "use" <_<

what code should I use to the script be activated with pick use, and not "Use" u know? *-*

thanks :thumbup:
 
Replace:
Code:
function onUse(cid, item, frompos, item2, topos)

With:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
AAH

now I see how it works

I've rather change itemEx to item2 to avoid malfunctions in the rest of the script

adding rep :}

thanks a lot ppl, it's working perfectly!
 
Add this to your pick.lua.

Code:
	if itemEx.actionid == [COLOR="red"]XXXX[/COLOR] then -- ACTION ID OF THE GROUND
		local new = {x = 100, y = 100, z = 7}
		doTeleportThing(cid, new, true)
		doSendMagicEffect(new, CONST_ME_TELEPORT)
	end

?? :huh:
 
just post the original pick script here,
and the action/uni id you wanted to have on the item (on the ground).
and I answer fast I can.

Thanks a lot for being helpful, but I already solve the script problem (with the help of the community, of course) :thumbup:

-- edit --

problem solved, I'll close the topic to avoid spam, thanks a lot everyone
 
Status
Not open for further replies.
Back
Top