Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna
FAQ Szukaj Użytkownicy Grupy Profil Zaloguj się, by sprawdzić wiadomości
Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna  Zaloguj  Rejestracja
Npc heal i training monk

 
Napisz nowy temat   Odpowiedz do tematu    Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna -> Publikacje do OTS'ów
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Adminjacek
Administrator
Administrator



Dołączył: 28 Paź 2006
Posty: 58
Przeczytał: 0 tematów

Ostrzeżeń: 0/10

PostWysłany: Czw 21:35, 09 Lis 2006    Temat postu: Npc heal i training monk

Witam,
Ostatni robi się wiele tematów, że ludzie poszukaj heal npc i trening monk, a wystarczy tylko poszukac.
Ja znalazłem i postanowiłęm tu go opublikować.

Healing NPC
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
          selfSay('hello ' .. creatureGetName(cid) .. ' I am a monk sent by GM ToMeCzEkKk to help all the citizens of Okara. If u need help just ask me.')
          focus = cid
          talk_start = os.clock()

      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, 'monk') then
                                          selfSay('Yes i am a monk.')
                           elseif msgcontains(msg, 'heal') then
                                          selfSay('Let me heal you so you will be ready for more adventures!')
                                          selfSay('exura sio "' .. creatureGetName(cid) .. '')
                           elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
            selfSay('Goodbye young traveler.')
            focus = 0
            talk_start = 0
        end
    end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
      if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('May Nick bless your adventures.')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Be careful in your quests of Okara.')
             focus = 0
         end
     end
end


Trening Monk
Kod:
<?xml version="1.0"?>
<monster name="Trainer" level="20" maglevel="50" experience="200" pushable="0" armor="25" defense="30" canpushitems="1" staticattack="50" changetarget="238">
    <health now="100000" max="100000"/>
    <look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
    <combat targetdistance="1" runonhealth="0"/>

    <attacks>
        <attack type="melee" maxdamage="100"/>
        <attack type="instant" name="exura vita" exhaustion="10" cycleticks="100" probability="100"/>
    </attacks>

    <defenses>
        <defense immunity="invisible"/>
    </defenses>

    <voices>
    </voices>

    <loot>
    </loot>
</monster>


Pamiętajcie: zawsze nazwy potworów dodajcie do pliku montsers.xml.


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna -> Publikacje do OTS'ów Wszystkie czasy w strefie CET (Europa)
Strona 1 z 1

 
Skocz do:  
Nie możesz pisać nowych tematów
Nie 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, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign
Regulamin