• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Tell the password to be teleported

Kuzyn

Dziad.
Członek Załogi
Dołączył
Maj 3, 2008
Posty
1950
Liczba reakcji
166
This script is from 2008, it may not work as intended now. However, I wanted to bring back some basic scripts that can be used as a learning examples.

Status: Not tested / created for 8.1 (reply to this topic if you have tested it!)
Description: If player stands in a certain tile, he can teleport himself after saying the correct password. Could be a great addition for RPG quests.
Author: Mappequ

talkactions/scripts > teleport.lua
Kod:
local standPos = {x=100,y=100,z=7} -- Tile on which player needs to stand on
local newPos = {x=100,y=100,z=7} -- Tile where player should be teleported after saying password

function onSay(cid, param)
    if comparePos(getPlayerPosition(cid), standPos) then
        doSendMagicEffect(getPlayerPosition(cid), 2)
        doTeleportThing(cid, newPos)
        doSendMagicEffect(newPos, 10)
    end
    return 1
end

talkactions > talkactions.xml
Kod:
<talkaction words="password" script="teleport.lua" /> <!-- The word that needs to be said by player to teleport him from one position to another. -->

Szukam bota dla klientów Altaron.pl
jesli ktos by chciał stworzyc to zaplace

Szukam bota dla klientów Altaron.pl
jesli ktos by chciał stworzyc to zaplace
maja własnego klienta
nie mozna sprawdzic jaka wersja clienta kiedys mozna bylo elfa ale teraz banuja
szukam czego kolwiek
 
Do góry