Cze, mam taki sobie skrypcik inq:
Jeśli dobrze wyczytałem z tego skryptu to storage = 56123 a value to w przypadku 1 roomu 1001, jak to zapisać w quests.xml?
Code:
local config = {
bosses={---aid of portal, position where it sends, value it sets, text it shows
[1001] = {pos={x=1541, y=2505, z=13, stackpos=1}, value=1, text="Wszedles do The Crystal Caves"},
[1002] = {pos={x=1490, y=2568, z=13, stackpos=1}, value=2, text="Wszedles do The Blood Halls"},
[1003] = {pos={x=1503, y=2582, z=10, stackpos=1}, value=3, text="Wszedles do The Vats"},
[1004] = {pos={x=1510, y=2552, z=13, stackpos=1}, value=4, text="Wszedles do The Arcanum"},
[1005] = {pos={x=1636, y=2652, z=13, stackpos=1}, value=5, text="Wszedles do The Hive"},
[1006] = {pos={x=1587, y=2600, z=10, stackpos=1}, value=6, text="Wszedles do The Shadow Nexus"}
},
mainroom={---aid, position, lowest value that can use this portal, text
[2001] = {pos={x=1541, y=2505, z=13, stackpos=1}, value=1, text="Wszedles do The Crystal Caves"},
[2002] = {pos={x=1490, y=2568, z=13, stackpos=1}, value=2, text="Wszedles do The Blood Halls"},
[2003] = {pos={x=1503, y=2582, z=10, stackpos=1}, value=3, text="Wszedles do The Vats"},
[2004] = {pos={x=1510, y=2552, z=13, stackpos=1}, value=4, text="Wszedles do The Arcanum"},
[2005] = {pos={x=1636, y=2652, z=13, stackpos=1}, value=5, text="Wszedles do The Hive"} },
portals={---aid, position, text
[3000] = {pos={x=1556, y=2584, z=12}, text="Wyszedles z komnaty"},
[3001] = {pos={x=1614, y=2491, z=10}, text="Wszedles do The Ward of Ushuriel"},
[3002] = {pos={x=1444, y=2595, z=11}, text="Wszedles do The Undersea Kingdom"},
[3003] = {pos={x=1577, y=2491, z=10}, text="Wszedles do The Ward of Zugurosh"},
[3004] = {pos={x=1474, y=2544, z=10}, text="Wszedles do The Foundry"},
[3005] = {pos={x=1589, y=2529, z=10}, text="Wszedles do The Ward of Madareth"},
[3006] = {pos={x=1462, y=2620, z=10}, text="Wszedles do The Battlefield"},
[3008] = {pos={x=1603, y=2466, z=11}, text="Wszedles do The Soul Wells"},
[3007] = {pos={x=1561, y=2530, z=10}, text="Wszedles do The Ward of The Demon Twins"},
[3009] = {pos={x=1541, y=2484, z=10}, text="Wszedles do The Ward of Annihilon"},
[3010] = {pos={x=1517, y=2529, z=10}, text="Wszedles do The Ward of Hellgorak"} },
storage=56123,---storage used in boss and mainroom portals
e={} }----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if(config.bosses[item.actionid]) then
local t= config.bosses[item.actionid]
if getPlayerStorageValue(cid, config.storage)< t.value then
setPlayerStorageValue(cid, config.storage, t.value)
end
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,19,1, config.e)
elseif(config.mainroom[item.actionid]) then
local t= config.mainroom[item.actionid]
if getPlayerStorageValue(cid, config.storage)>=t.value then
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,19,1,config.e)
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid, 'Musisz pokonac odpowiedniego bossa aby przejsc przez ten portal.', TALKTYPE_ORANGE_1)
end
elseif(config.portals[item.actionid]) then
local t= config.portals[item.actionid]
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,19,1,config.e)
end
end
end
Jeśli dobrze wyczytałem z tego skryptu to storage = 56123 a value to w przypadku 1 roomu 1001, jak to zapisać w quests.xml?