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

Lua NPC that teleport all players in party

gabriel28

Member
Joined
Mar 16, 2012
Messages
199
Solutions
6
Reaction score
24
Good morning / afternoon / evening. I would like a help in designing a script of an NPC that teleports all the players that are in party (as the title already says).
It would work as follows: The leader of the party would talk to the NPC and he would teleport all players to the local X.
Transcripts, to facilitate if someone is willing to do, would be:
player: hi
npc: I'm surprised you could have come here to challenge me (if you are the party leader)
npc: You are not leader of any party (if not a party leader)
player: challenge
npc: To challenge me, you must have a sacrifice, you have it?
player: yes
npc: Ok then. I hope you are prepared (if the player has the item would remove one item from id: CCCC and teleport all that had in party with him)
npc: You do not have the type of sacrifice that I would like (if the player does not have the item)

After teleporting the players, the npc would disappear for 10 minutes, to avoid that another party enters the place as well.
If it can be do, this npc would not open the NPC channel, it would be that neither in the old versions, to be able to avoid that more of a person talks to him at the same time.
Also a time script for fromPos area: XXXXXX toPos: YYYYYY that after 10 minutes, teleport all player in that área to the temple.

Thank you in advance.
 
Good morning / afternoon / evening. I would like a help in designing a script of an NPC that teleports all the players that are in party (as the title already says).
It would work as follows: The leader of the party would talk to the NPC and he would teleport all players to the local X.
Transcripts, to facilitate if someone is willing to do, would be:
player: hi
npc: I'm surprised you could have come here to challenge me (if you are the party leader)
npc: You are not leader of any party (if not a party leader)
player: challenge
npc: To challenge me, you must have a sacrifice, you have it?
player: yes
npc: Ok then. I hope you are prepared (if the player has the item would remove one item from id: CCCC and teleport all that had in party with him)
npc: You do not have the type of sacrifice that I would like (if the player does not have the item)

After teleporting the players, the npc would disappear for 10 minutes, to avoid that another party enters the place as well.
If it can be do, this npc would not open the NPC channel, it would be that neither in the old versions, to be able to avoid that more of a person talks to him at the same time.
Also a time script for fromPos area: XXXXXX toPos: YYYYYY that after 10 minutes, teleport all player in that área to the temple.

Thank you in advance.
Lua:
     local destination = {x = 0, y = 0, z = 0}
    if getPlayerParty(cid) then
        for _, pid in pairs(getPartyMembers(cid)) do
            doTeleportThing(pid, destination)
        end
    end
 
Lua:
     local destination = {x = 0, y = 0, z = 0}
    if getPlayerParty(cid) then
        for _, pid in pairs(getPartyMembers(cid)) do
            doTeleportThing(pid, destination)
        end
    end


In this part "getPlayerParty", is not "getPartyLeader" or something like that?
 
Back
Top