What's new

Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

Status
Not open for further replies.

Szowel

Active User
Joined
Oct 23, 2010
Messages
119
Reaction score
1
Age
31
Witam , potrzebuj? skrypta gdzie tp b?dzie teleportowa?o losowo w jedno z np. 5 miejsc o podanych wsp??rz?dnych.

Za skrypta dam reputa +
 

Szowel

Active User
Joined
Oct 23, 2010
Messages
119
Reaction score
1
Age
31
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

...Od?wie?am...
 

dominikms1

Senior User
Joined
Feb 6, 2010
Messages
696
Reaction score
66
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

PHP:
teleports = {
[1] = {x=1, y=2, z=7},
[2] = {x=1, y=2, z=7},
}

doTeleportThing(cid, teleports[math.random(1, #teleports)], false)
 

Szowel

Active User
Joined
Oct 23, 2010
Messages
119
Reaction score
1
Age
31
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

zastosowa?em tw?j skrypt i nie dzia?a a w silniku nie ma b??du , m?j kod:

teleports = {
[1] = {x=2946, y=2583, z=15},
[2] = {x=2983, y=2584, z=15},
[3] = {x=3016, y=2584, z=15},
[4] = {x=3046, y=2584, z=15},
[5] = {x=3075, y=2584, z=15},
}
if(isPlayer(cid)) then
doTeleportThing(cid, teleports[math.random(1, #teleports)], false)
function onStepIn(cid, item, pos)
end
return true
end

a movements mam tak:
<movevent type="StepIn" uniqueid="4495" event="script" value="tepe.lua"/>

dlaczego nie dzia?a ?
 

BuRcZyK

Senior User
Joined
Sep 2, 2010
Messages
834
Reaction score
35
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

ustawi?e? na "klocku" uniq id?
 

dominikms1

Senior User
Joined
Feb 6, 2010
Messages
696
Reaction score
66
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

PHP:
teleports = {
[1] = {x=2946, y=2583, z=15},
[2] = {x=2983, y=2584, z=15},
[3] = {x=3016, y=2584, z=15},
[4] = {x=3046, y=2584, z=15},
[5] = {x=3075, y=2584, z=15},
}

function onStepIn(cid, item, pos)
if(isPlayer(cid)) then
doTeleportThing(cid, teleports[math.random(1, #teleports)],false)
end
return true
end
Poprawione.

?le zainstalowa?e? m?j skrypt, a mianowicie dodale? przed funkcja (onStepin)
 

Szowel

Active User
Joined
Oct 23, 2010
Messages
119
Reaction score
1
Age
31
Odp: Tp teleportuj?ce w kilka losowo w wyznaczone miejsca.

dzi?ki dominikms1 , dzia?a jak trzeba , przyznaj? reputa oraz uznaj? temat do zamkni?cia:D
Pozdrawiam :)
 
Status
Not open for further replies.
Top