Nie tylko o Tibii i OTS...
Witam. Skrypt nie jest mój!!
Zadanie z klimatów króla artura ; )
Postaram się opisać i wytłumaczyć questa jak najlepiej potrawie.
Na początku wchodzimy w swój mapeditor i stawiamy kamyczek+broń o ID 1512
Do Dziela
Wchodzimy w actions i tworzymy plik: swordstone.lua :
--swordstone script by dt05-- function onUse(cid, item, frompos, item2, topos) exit = {[color=#800080]x=107, y=96, z=7[/color]}--Jeżeli zadanie się nie powiedzie zostaniesz teleportowany na te współrzędne.-- rand = math.random([color=red]1,300[/color])--szanse na wyciagniecie Sworda-- if rand == 1 then queststatus = getPlayerStorageValue(cid,5555) if queststatus == -1 then doSendMagicEffect(topos,13) doPlayerSendTextMessage(cid,22,"Congratulations!!! you were the chosen one to own this powerful sword.") doPlayerAddItem(cid,2408,1) setPlayerStorageValue(cid,5555,1) else doPlayerSendTextMessage(cid,22,"You already pulled out the sword.") end elseif rand >= 2 and rand <300 then doPlayerSendTextMessage(cid,22,"Sorry, you are not the chosen one.") doTeleportThing(cid,exit) doSendMagicEffect(topos,13) else doPlayerSendCancel(cid, "Sorry,not possible.") end return 1 end
Następnie w actions.xml dodajemy linijke:
<action uniqueid="[color=red]9000[/color]" script="swordstone.lua" />
9000 <--- unikalne ID zadania.
Pamiętaj ,że nie zawsze wyciągniesz owy miecz. Masz zaledwie kilka % na to.
Jeżeli Ci się to nie uda ,zostaniesz teleportowany na początek zadania.
Czekam na Comments ;] i plusy P
Offline
No no...fajny skrypt ;] szkoda ze nie twoj bo jest 9/10 ;] dziexx za screena ;]
PoZdRO
Offline