• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Actions Skrypty na Anni, Dhq i Poia

Status
Zamknięty.

Piotrek05

Advanced User
Dołączył
Luty 18, 2009
Posty
471
Liczba reakcji
38
Witam. Na wielu forach widze tematy pt. „Anni mi nie dziala plx pomozcie” itp.
Postanowi?em wiec napisac temat gdzie zamieszcze dzia?aj?ce skrypty anni dhq i poi.
Sam niedawno szukalem owych skryptow i nie wszystkie kt?re mi dawno dzia?a?y.
Teraz ja postanowi?em pomoc newbie i dac te 3 skrypty.
Skrypy nie sa moje.
Oto one:
-Annihilator(bez prezentu):
Kod:
-- UniqueIDs:
--
-- 8000 = uid dzwigni
-- 9000 = Demon Armor chest.
-- 9001 = Magic Sword chest.
-- 9002 = Stonecutter Axe chest.
--
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8000 then      --uid dzwigni
if item.itemid == 2711 then    -id dzwigni
player1pos = {x=1065, y=1198, z=9, stackpos=253} --pozycja 1 playera
player1 = getThingfromPos(player1pos)
player2pos = {x=1064, y=1198, z=9, stackpos=253}  --pozycja 2 playera
player2 = getThingfromPos(player2pos)
player3pos = {x=1063, y=1198, z=9, stackpos=253} --pozycja 3 playera
player3 = getThingfromPos(player3pos)
player4pos = {x=1062, y=1198, z=9, stackpos=253} --pozycja 4 playera
player4 = getThingfromPos(player4pos)
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
  player1level = getPlayerLevel(player1.uid)
  player2level = getPlayerLevel(player2.uid)
  player3level = getPlayerLevel(player3.uid)
  player4level = getPlayerLevel(player4.uid)
  questlevel = 100  -- lvl questa
  if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then
  queststatus1 = getPlayerStorageValue(player1.uid,6026)
  queststatus2 = getPlayerStorageValue(player2.uid,6026)
  queststatus3 = getPlayerStorageValue(player3.uid,6026)
  queststatus4 = getPlayerStorageValue(player4.uid,6026)
  if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
    demon1pos = {x=1093, y=1223, z=9}  -- pozycja 1szego demona
    demon2pos = {x=1095, y=1223, z=9}  -- pozycja 2go demona
    demon3pos = {x=1092, y=1227, z=9}  -- pozycja 3go demona
    demon4pos = {x=1094, y=1227, z=9}  -- pozycja 4go demona
    demon5pos = {x=1096, y=1225, z=9}  -- pozycja 5go demona
    demon6pos = {x=1097, y=1225, z=9}  -- pozycja 6go demona
    doSummonCreature("Demon", demon1pos)
    doSummonCreature("Demon", demon2pos)
    doSummonCreature("Demon", demon3pos)
    doSummonCreature("Demon", demon4pos)
    doSummonCreature("Demon", demon5pos)
    doSummonCreature("Demon", demon6pos)
    nplayer1pos = {x=1095, y=1225, z=9}  --  gdzie ma byc teleportowany gracz 1
    nplayer2pos = {x=1094, y=1225, z=9}  --  gdzie ma byc teleportowany gracz 2
    nplayer3pos = {x=1093, y=1225, z=9}  --  gdzie ma byc teleportowany gracz 3
    nplayer4pos = {x=1092, y=1225, z=9}  --  gdzie ma byc teleportowany gracz 4
    doSendMagicEffect(player1pos,2)
    doSendMagicEffect(player2pos,2)
    doSendMagicEffect(player3pos,2)
    doSendMagicEffect(player4pos,2)
    doTeleportThing(player1.uid,nplayer1pos)
    doTeleportThing(player2.uid,nplayer2pos)
    doTeleportThing(player3.uid,nplayer3pos)
    doTeleportThing(player4.uid,nplayer4pos)
    doSendMagicEffect(nplayer1pos,10)
    doSendMagicEffect(nplayer2pos,10)
    doSendMagicEffect(nplayer3pos,10)
    doSendMagicEffect(nplayer4pos,10)
    doTransformItem(item.uid,item.itemid+1)
  else
    doPlayerSendCancel(cid,"Not Possible.")
  end
  else
  doPlayerSendCancel(cid,"Not Possible.")
  end
else
  doPlayerSendCancel(cid,"Not Possible.")
end
elseif item.itemid == 1946 then
if getPlayerAccess(cid) == 3 then
  doTransformItem(item.uid,item.itemid-1)
else
  doPlayerSendCancel(cid,"Not Possible.")
end
end
----LOOTS
elseif item.uid == 9000 then  --unique id skrzynki
queststatus = getPlayerStorageValue(cid,6080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got a Demon Armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,6080,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
elseif item.uid == 9001 then--unique id skrzynki
queststatus = getPlayerStorageValue(cid,6080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got a Magic Sword.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,6080,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
elseif item.uid == 9002 then--unique id skrzynki
queststatus = getPlayerStorageValue(cid,6080)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got a Stonecutter Axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,6080,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
end
return 1
end
W actions.xml dodajemy:
Kod:
<action uniqueid="8000" script="annihilator.lua" />
<action uniqueid="9000" script="annihilator.lua" />
<action uniqueid="9001" script="annihilator.lua" />
<action uniqueid="9002" script="annihilator.lua" />
Na anni w map edytorze nie dodajemy respow demonow poniewaz skrypt sam je summonuje.
Oto id ktorych trzeba uzyc:
- Pod?oga: 426
- To na czym ma byc przelacznik: 1617
- Prze??cznik(dzwignia): 1946
To ma wygladac tak:
anhuqq1.jpg

-Dhq:
-Dzwignia:
Kod:
-- Dhq Lever --
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=869, y=1060, z=7, stackpos=1}  --polozenie kamienia
getgate = getThingfromPos(gatepos)
if item.uid == [color=red]1234[/color] and item.itemid == [color=yellow]1945 [/color]and getgate.itemid == [color=blue]1355[/color] then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 1234 and item.itemid == 1946
and getgate.itemid == 0 then
doCreateItem(1355,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Na niebiesko id kamienia.
Na zolto id przelacznika(dzwigni)
Na czerwono uid przelacznika(dzwigni).
-Skrzynki dhq:
Kod:
-- Demon helmet chest by MTK
function onUse(cid, item, frompos, item2, topos)
   	if item.uid == 7407 then  --unique id skrzynki
   		queststatus = getPlayerStorageValue(cid,7407)
   		if queststatus == -1 or queststatus == 0 then
   			doPlayerSendTextMessage(cid,22,"You got a Steel Boots.")
   			doPlayerAddItem(cid,2645,1)
   			setPlayerStorageValue(cid,7407,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 7406 then  --unique id skrzynki
   		queststatus = getPlayerStorageValue(cid,7406)
   		if queststatus == -1 or queststatus == 0 then
                       doPlayerSendTextMessage(cid,22,"You got a Demon Helmet.")
                       doPlayerAddItem(cid,2493,1)
                       setPlayerStorageValue(cid,7406,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 7405 then  --unique id skrzynki
                queststatus = getPlayerStorageValue(cid,7405)
                if queststatus == -1 or queststatus == 0 then
                       doPlayerSendTextMessage(cid,22,"You got a Demon Shield.")
                       doPlayerAddItem(cid,2520,1)
                       setPlayerStorageValue(cid,7405,1)
                 else
                       doPlayerSendTextMessage(cid,22,"it's empty.")
                end
	else
		return 0
   	end
   	return 1
end
Do actions.xml dodajemy:
Kod:
<action uniqueid="1234" script="demonhelm2.lua" />
<action uniqueid="7407" script="demonhelm.lua" />
<action uniqueid="7405" script="demonhelm.lua" />
<action uniqueid="7406" script="demonhelm.lua" />
-Poi skrzynki:
Kod:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 9993 then  --unique id skrzynki
queststatus = getPlayerStorageValue(cid,6082)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got an Avanger.")
doPlayerAddItem(cid,6528,1)
setPlayerStorageValue(cid,6082,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
elseif item.uid == 9994 then--unique id skrzynki
queststatus = getPlayerStorageValue(cid,6082)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got a Naginata.")
doPlayerAddItem(cid,2426,1)
setPlayerStorageValue(cid,6082,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
elseif item.uid == 9995 then--unique id skrzynki
queststatus = getPlayerStorageValue(cid,6082)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got a Arcane Staff.")
doPlayerAddItem(cid,2453,1)
setPlayerStorageValue(cid,6082,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
elseif item.uid == 9995 then--unique id skrzynki
queststatus = getPlayerStorageValue(cid,6082)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You got anArbalest")
doPlayerAddItem(cid,5803,1)
setPlayerStorageValue(cid,6082,1)
else
doPlayerSendTextMessage(cid,22,"You can get only one item.")
end
end
return 1
end
Do actions.xml dodajemy :
Kod:
<action uniqueid="9993" script="poi.lua" />
<action uniqueid="9994" script="poi.lua" />
<action uniqueid="9995" script="poi.lua" />
<action uniqueid="9996" script="poi.lua" />
Co do poia nagrody sobie sami ustawcie bo ja mam takie jak widac.
Gdy ktos nie wiedzia? jak zmienic to po prostu w tej linijce: doPlayerAddItem(cid,5803,1)
Zmieniamy 5803 na id itemku no i napis (u mnie jest You got an Arbalest)
Spis id itemkow mo?na znale?? tu
W razie jakis niedoci?gni?? lub bledow prosz? pisac na priv lub w temacie.
Mam nadzieje ze si? przyda.
 
Odp: Skrypty na Anni, Dhq i Poia

Moze sie komus przydac ale to s? przyk?adowe skrypty kt?re czesto mozemy spotka? w naszych silnikach + za checi nie ocenie tego ;]
 
Odp: Skrypty na Anni, Dhq i Poia

Skrypt dobry ale ?eby np. dzia?a? annihilator musisz usun?? to w annihilator.lua
"-- pozycja 6go demona"
Bo wyskakuje blad ze nie wczytuje tego bo ni moze wczytac "-" kreseczki ;]
 
Odp: Skrypty na Anni, Dhq i Poia

Mi czyta. Moze masz inny silnik i dlatego. Zobacz czy masz dobrze skopiowane.
I pokaz ten blad.
 
Odp: Skrypty na Anni, Dhq i Poia

Ej nie dzia?a mi dhq nie mog? d?wigni? ruszy? o co chodzi?
?aden b??d nie wyskakuje.

Edit
Sorry ju? wszystko dzia?a przeczyta?em ze na niebiesko uid xD a to id.
 
Ostatnia edycja:
Odp: Skrypty na Anni, Dhq i Poia

Z tym DHQ jest problem mi te? nie dzia?a, ale reszta skrypt?w 10/10 :up:
 
Odp: Skrypty na Anni, Dhq i Poia

No wiesz takie zeczy to nie jest trudno zrobic ale dla jakis poczatkujacych to ok 8/10
 
Odp: Skrypty na Anni, Dhq i Poia

Musze Ci pogratulowa? bo wszystkie skrypty dzia?aj?, no przynajmniej mi dzia?aj?, ale mog?e? ten prezent zostawi? w anhi...
Jak komu? nie dzia?a to przeczytajcie chocia? raz wszystko, a nie tylko kopiuj, wklej i marudzicie, ?e nie dzia?a.:down:
 
Odp: Skrypty na Anni, Dhq i Poia

Zrobi?? Przecie? to jest w?a?nie kopiuj-wklej...
Te skrypty mo?na znale?? nawet w silnikach.
 
Odp: Skrypty na Anni, Dhq i Poia

Wielkie dzienki robie w?asnego OTS-a i w?asnie szuka?em skryptu na ANHILATOR QUEST mam nadzieje ?e bedzie dzia?a?... napisze puzniej:D
 
Odp: Skrypty na Anni, Dhq i Poia

Mi all zdiala oba skrypty wlasnie ich szukalem bo nie bylo ich gotowym otsie:)THX 9/10
 
Odp: Skrypty na Anni, Dhq i Poia

nie dziala ani -.- szukam [-] bo w konsoli wywala blad

[29/07/2009 13:02:35] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua)
[29/07/2009 13:02:35] data/actions/scripts/quests/annihilator.lua:44: unexpected symbol near '='



nplayer2pos = {x= 176, y= 247, z= 10}, -- gdzie ma byc teleportowany gracz 2


Linia 44
 
Ostatnia edycja:
Odp: Skrypty na Anni, Dhq i Poia

up
zamie? na
nplayer2pos = {x= 176, y= 247, z= 10}

i tyle

Skrypty s? ?rednie bo skopiowane z rl i nie napisa?e? autor?w..
 
Odp: Skrypty na Anni, Dhq i Poia

Ani dzia?a, dzi?ki przyda?o si?, bo w?a?nie robi? ots'a.

Reput p??niej poleci.
 
Odp: Skrypty na Anni, Dhq i Poia

Jak chce anni zrobic wyskakuje cos takiego

[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse

[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00885 / 00744 / 010 ) Tile not found

[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse

[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00884 / 00744 / 010 ) Tile not found

[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse

[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00883 / 00744 / 010 ) Tile not found

[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse

[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00882 / 00744 / 010 ) Tile not found
 
Odp: Skrypty na Anni, Dhq i Poia

Jak chce anni zrobic wyskakuje cos takiego
[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse
[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00885 / 00744 / 010 ) Tile not found
[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse
[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00884 / 00744 / 010 ) Tile not found
[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse
[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00883 / 00744 / 010 ) Tile not found
[11/12/2009 16:08:18] Lua Script Error: [Action Interface]
[11/12/2009 16:08:18] data/actions/scripts/annihilator.lua:onUse
[11/12/2009 16:08:18] luaGetThingfromPos(). ( 00882 / 00744 / 010 ) Tile not found


Prawdopodobnie masz w pliku annihilator wpisane z?e wsp??rz?dne summonowania demon?w. Musisz wej?? w map edytor i sprawdzi? wsp??rz?dne i zmieni? je w wy?ej wymienionym pliku.
 
Odp: Skrypty na Anni, Dhq i Poia

hmm... tak wszystko ?adnie pi?knie tylko od kiedy na poi jest naginata?
Kod:
doPlayerSendTextMessage(cid,22,"You got a Naginata.")
 
Status
Zamknięty.
Do góry