Xylio - 2008-05-20 16:41:17

Objaśnię prosty, przydatny skrypt.
Chodzi o to, że kiedy pociągniesz za dźwignię znika ściana, magic wall lub cokolwiek innego.
w data/actions/actions.xml dodajemy :

Kod:

<action uniqueid="3001" script="dzwignia1.lua" />

w data/actions/scripts/ dodajemy "dzwignia1.lua"

Kod:

function onUse(cid, item, frompos, item2, topos)
gatepos = {x=1093, y=963, z=7, stackpos=1}
getgate = getThingfromPos(gatepos)

if item.uid == 3001 and item.itemid == 1945 and getgate.itemid == 3361 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 3001 and item.itemid == 1946
and getgate.itemid == 0 then
doCreateItem(3361,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end

Gatepos to współrzędne ściany, która ma zniknać (zmieńcie sobie)
3361 - id sciany (zmieńcie sobie)
3001 - unique id dźwigni(zmieńcie sobie lub nie)
Jak zrobić w map editorze:
1. Robicie dźwignie o id 1945 i unique id jakie se wybierzecie.
2. Robicie ściane, której współżedne są na początku skryptu (gatepos).
Mam nadzieję że temat się przyda.

www.adapciak.pun.pl www.robaki.pun.pl www.dianne-forum.pun.pl www.shahrukh-juhi.pun.pl www.tirrok1.pun.pl