Torba
Moderator
Dołączył: 22 Sty 2007
Posty: 54
Przeczytał: 0 tematów
Pomógł: 10 razy Skąd: Olsztyn
|
Wysłany: Czw 13:07, 03 Maj 2007 Temat postu: Vocation Quest |
|
|
Co to robi?
Chyba każdy wie, co się dzieje podczas Desert Questu. Czterech graczy o różnych profesjach, po 20 lvlu staje na polach, ustawiają 4 itemy (knight sworda, paladyn kuszę, druid jabłko, a sorcerer spellbook) naprzeciw siebie, a jeden pcha dźwignie. Jeżeli wszystko jest w porządku, itemy znikają, a graczy teleportuje do pokoju z nagrodą.
Na jakie jest to OTSy?
Na wszystkie OTSy 7.92 wykorzystujące revbattlesys.
Skrypt (vocation_quest.lua):
-- Vocation Quest - by Killavus --
function onUse(cid, item, frompos, item2, topos)
-- Variables --
local knight_position = {x = 100, y = 100, z = 7, stackpos = 253}
local paladin_position = {x = 100, y = 100, z = 7, stackpos = 253}
local druid_position = {x = 100, y = 100, z = 7, stackpos = 253}
local sorcerer_position = {x = 100, y = 100, z = 7, stackpos = 253}
local sword_position = {x = 100, y = 100, z = 7, stackpos = 1}
local crossbow_position = {x = 100, y = 100, z = 7, stackpos = 1}
local apple_position = {x = 100, y = 100, z = 7, stackpos = 1}
local spellbook_position = {x = 100, y = 100, z = 7, stackpos = 1}
local knight = getThingfromPos(knight_position)
local paladin = getThingfromPos(paladin_position)
local druid = getThingfromPos(druid_position)
local sorcerer = getThingfromPos(sorcerer_position)
local sword = getThingfromPos(sword_position)
local crossbow = getThingfromPos(crossbow_position)
local apple = getThingfromPos(apple_position)
local spellbook = getThingfromPos(spellbook_position)
-- Variables END --
if(item.itemid == 1945) then
-- All creatures in positions are players CHECK --
if (isPlayer(knight.uid) == 1)
and (isPlayer(paladin.uid) == 1)
and (isPlayer(druid.uid) == 1)
and (isPlayer(sorcerer.uid) == 1) then
-- All players have good vocations CHECK --
if(getPlayerVocation(knight.uid) == 4) or (getPlayerVocation(knight.uid) == 8)
and (getPlayerVocation(paladin.uid) == 3) or (getPlayerVocation(paladin.uid) == 7)
and (getPlayerVocation(druid.uid) == 2) or (getPlayerVocation(druid.uid) == 6)
and (getPlayerVocation(sorcerer.uid) == 1) or (getPlayerVocation(sorcerer.uid) == 5) then
-- All players in positions have at least 20 level CHECK --
if(getPlayerLevel(knight.uid) >= 20)
and (getPlayerLevel(paladin.uid) >= 20)
and (getPlayerLevel(druid.uid) >= 20)
and (getPlayerLevel(sorcerer.uid) >= 20) then
-- All items are in its places CHECK--
if(sword.itemid == 2376)
and (crossbow.itemid == 2455)
and (apple.itemid == 2674)
and (spellbook.itemid == 2175) then
-- Remove items! DO --
doRemoveItem(sword.uid, 1)
doRemoveItem(crossbow.uid, 1)
doRemoveItem(apple.uid, 1)
doRemoveItem(spellbook.uid, 1)
-- Send magic effects on player positions! DO --
doSendMagicEffect(knight_position, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(paladin_position, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(druid_position, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(sorcerer_position, CONST_ME_MAGIC_BLUE)
-- Send magic effect on item positions! DO --
doSendMagicEffect(knight_position, CONST_ME_MAGIC_GREEN)
doSendMagicEffect(paladin_position, CONST_ME_MAGIC_GREEN)
doSendMagicEffect(druid_position, CONST_ME_MAGIC_GREEN)
doSendMagicEffect(sorcerer_position, CONST_ME_MAGIC_GREEN)
-- Declare new positions of players! --
local new_knight_position = {x = 200, y = 200, z = 7}
local new_paladin_position = {x = 200, y = 200, z = 7}
local new_druid_position = {x = 200, y = 200, z = 7}
local new_sorcerer_position = {x = 200, y = 200, z = 7}
-- Teleport players to new positions! DO --
doTeleportThing(knight.uid, new_knight_position)
doTeleportThing(paladin.uid, new_paladin_position)
doTeleportThing(druid.uid, new_druid_position)
doTeleportThing(sorcerer.uid, new_sorcerer_position)
-- Send magic effects on new player positions! DO --
doTeleportThing(knight.uid, new_knight_position)
doTeleportThing(paladin.uid, new_paladin_position)
doTeleportThing(druid.uid, new_druid_position)
doTeleportThing(sorcerer.uid, new_sorcerer_position)
-- Push the lever! DO --
doTransformItem(item.uid, item.itemid + 1)
end
end
end
end
else
doTransformItem(item.uid, item.itemid - 1)
end
return 1
end
Do actions.xml dodaj:
-- Vocation Quest - by Ktos and Torba
<action uniqueid="8500" script="vocation_quest.lua" />
Na mapie ustaw dźwignie z Unique ID 8500.
Niektore zeczy powinniescie zmienic wg wlascyh upodoban
PZDR
Post został pochwalony 0 razy
|
|