Forum Polityka Strona Główna
RejestracjaSzukajFAQUżytkownicyGrupyGalerieZaloguj
Moze te lepsze

 
Odpowiedz do tematu    Forum Polityka Strona Główna » Scrypty Zobacz poprzedni temat
Zobacz następny temat
Moze te lepsze
Autor Wiadomość
Gen Michu
Poczatkujący
Poczatkujący



Dołączył: 16 Cze 2006
Posty: 47
Przeczytał: 0 tematów

Ostrzeżeń: 1/5
Skąd: Szamotuły

Post Moze te lepsze
Wand ktory pozwala vhodzic po wodzie
xD



wiec tak napisalem sam w 100% tego scripta no prawda jest prawie identyczny do tego który pozwala chodzic po wodzie i dlatego ze jest script na wanda który pozwala chodzic powodzie dalem tez to na lave
wiec torzymy nowy redwand.lua w actions/script dalej i wpisujemy tam

function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 709 or item2.itemid == 654 or item2.itemid == 653 or item2.itemid == 656 or item2.itemid == 655 then
doTeleportThing(cid,topos)
doSendMagicEffect(topos,1)
doSendMagicEffect(frompos,1)
doPlayerSendTextMessage(cid,24,"ognio butki by Mate")
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You cannot use the wand here.")
end
return 1
end


i tworzymy nowa linijke w a actions/actions


<action itemid="3013" script="redwand.lua" allowfaruse="1" />









To sie rzyda na wielkanoc Razz




No więc w data/npc tworzymy plik Zajaczek Wielkanocny.xml i wklejamy w nim to:



Cytat:
<?xml version="1.0"?>
<npc name="Zajaczek Wielkanocny" script="data/npc/scripts/wielkanoc.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="74" head="20" body="30" legs="40" feet="50" corpse="3119"/>
</npc>

Następnie w scripts tworzymy plik wielkanoc.lua, a w nim wklejamy to:



Cytat:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Wesołej Wielkanocy!')
focus = 0
talk_start = 0
end
end

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
msg = string.lower(msg)

if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Wesołej Wielkanocy ' .. creatureGetName(cid) .. '!')
focus = cid
talk_start = os.clock()
end

if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Please wait.')
end

if string.find(msg, '(%a*)present(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
present = getPlayerStorageValue(cid,1210)
if present == -1 then
buy(cid,item,1,0)
setPlayerStorageValue(cid,1210,1)
end

if present == 1 then
selfSay('Sorry, nie mam więcej prezentów dla Ciebie.')
end
end

if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end


function onCreatureChangeOutfit(creature)
end


function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Wesołej Wielkanocy!')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
selfSay('Wesołej Wielkanocy!')
focus = 0
end
end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,25)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
end
if randmove >= 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
--summons = 30
--summons2 = 30
end

if focus > 0 then
rand = math.random(1,6)
if rand == 1 then
item = 2695
elseif rand == 2 then
item = 2684
elseif rand == 3 then
item = 2322
elseif rand == 4 then
item = 2688
elseif rand == 5 then
item = 2152
else
item = 2152
end
end

if focus == 0 then
randsay = math.random(1,75)
if randsay == 1 then
selfSay('Hmmhmm...')
end
if randsay == 2 then
selfSay('Cika, cika, cika...')
end end end

fajnie npc zmieniajacy plec xD
Kod:

focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end


function onCreatureTurn(creature)

end


function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
msg = string.lower(msg)

if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
if isPremmium(cid) then
selfSay('Hello ' .. creatureGetName(cid) .. '! I can change your sex... You want change your image..?')
selfLook(cid)
focus = cid
talk_start = os.clock()
else
selfSay('Sorry, only premium players can change sex.')
focus = 0
talk_start = 0
end

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'yes') then
if pay(cid,1000) then
selfSay('/changesex ' .. creatureGetName(cid))
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
zasiegym = 215
zasiegxm = 288
zasiegy = 210
zasiegx = 284
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,20)
if randmove == 1 then
nx = cx + 1
ny = cy

end
if randmove == 2 then
nx = cx - 1
ny = cy

end
if randmove == 3 then
ny = cy + 1
nx = cx

end
if randmove == 4 then
ny = cy - 1
nx = cx

end
if randmove >= 5 then
nx = cx
ny = cy
end
if ny >= zasiegy and nx >= zasiegx then

if ny <= zasiegym and nx <= zasiegxm then
moveToPosition(nx, ny, cz)
--summons = 30
--summons2 = 30
else
end
else
end
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end



Nie lubicie sie pazyc to macie buty chodzace po laiwe xD
----Lawowe Traper Bootsy by GLupEK!----
function onUse(cid, item, frompos, item2, topos)


if item2.itemid == 598 or item2.itemid == 599 or item2.itemid == 600 or item2.itemid == 601 or item2.itemid == 518 or item2.itemid == 519 or item2.itemid == 520 or item2.itemid == 521 or item2.itemid == 522 or item2.itemid == 523 or item2.itemid == 524 or item2.itemid == 525 or item2.itemid == 526 or item2.itemid == 527 or item2.itemid == 528 or item2.itemid == 529 or item2.itemid == 542 or item2.itemid == 543 or item2.itemid == 544 or item2.itemid == 545 or item2.itemid == 546 or item2.itemid == 547 or item2.itemid == 548 or item2.item2.itemid == 549 or item2.itemid == 550 or item2.itemid == 551 or item2.itemid == 552 or item2.itemid == 553 or item2.itemid == 554 or item2.itemid == 555 or item2.itemid == 556 or item2.itemid == 557 or item2.itemid == 558 or item2.itemid == 559 or item2.itemid == 560 or item2.itemid == 561 or item2.itemid == 562 or item2.itemid == 563 or item2.itemid == 564 or item2.itemid == 565 then

doTeleportThing(cid,topos)
doSendMagicEffect(topos,1)
doSendMagicEffect(frompos,1)
doPlayerSendTextMessage(cid,24,"Mozesz uzyc ich na Lawie.")

else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"nie mozesz ich tutaj zuywac!")
end
return 1
end



koncze juz jak bym mial pisac nie wiem czy bym sie wyrobil xD


Post został pochwalony 0 razy
Wto 22:51, 26 Gru 2006 Zobacz profil autora
GM
Administrator
Administrator



Dołączył: 15 Cze 2006
Posty: 100
Przeczytał: 0 tematów

Ostrzeżeń: 0/5


Post
Nom spox tylko one nie sa napisane przez ciebie xD


Post został pochwalony 0 razy
Czw 0:52, 28 Gru 2006 Zobacz profil autora
Gen Michu
Poczatkujący
Poczatkujący



Dołączył: 16 Cze 2006
Posty: 47
Przeczytał: 0 tematów

Ostrzeżeń: 1/5
Skąd: Szamotuły

Post
xD wiem Razz co ja sie bede meczyl Razz


Post został pochwalony 0 razy
Czw 10:09, 28 Gru 2006 Zobacz profil autora
Wyświetl posty z ostatnich:    
Odpowiedz do tematu    Forum Polityka Strona Główna » Scrypty Wszystkie czasy w strefie EET (Europa)
Strona 1 z 1

 
Skocz do: 
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.
Regulamin