What's new

Support Scripts - naprawiamy / tworzymy

Status
Not open for further replies.

ErMex

Egzekucja
Joined
Dec 1, 2010
Messages
574
Reaction score
181
1293652582_fd87b8d4_1293652728.gif

Jako i? ostatnio nie widz? podobnego tematu a pomocy oczekuje wielu u?ytkownik?w, postanowi?em wraz z Oskarem stworzy? temat gdzie naprawiamy oraz piszemy skrypty. Prosz?c nas o pomoc jeste? zobowi?zany przestrzega? regulaminu dzia?u oraz stosowania si? to wzoru podania. Prosz? wyra?nie napisa? z jakim problemem si? do nas zg?aszacie. Czy ma to by? skrypt action czy monster czy jaki? inny. Naprawiamy skrypty tylko i wy??cznie pod silniki SQL (8.4+). Dodaje, ?e nie robimy skrypt?w z pokemonami zwi?zanymi!

Pracuj? dla was:
ErMex
... - pisz na priv je?li chcesz zosta? pomocnikiem!

Wz?r, kt?ry macie stosowa? je?li mamy naprawi? skrypt:
Skrypt: (prosz? wklei? sw?j niedzia?aj?cy b?d? je?li mamy co? doda? napisa? w opisie co)
Opis skryptu: (co nie dzia?a? co doda?? pisa? tutaj)
Dodatkowe: (co? od siebie, mo?e by? puste)

Jesli mamy wam napisa? skrypt zapraszam do tego tematu:
Support Scripts - tworzymy


Notka moderatorska:
Temat przyklejam. Od siebie dodam, ?e posty z pro?b? o utworzenie nowego skryptu b?d? od razu warnowane, bez upomnienia.
 

Mistersi

Active User
Joined
Nov 28, 2010
Messages
54
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:
PHP:
-- Script by ErMex
local cena = 500000 -- ile ma kosztowa?
local tekst1 = "Gratulacje zakupiles 10 mlvl za 50 crystal coin" -- co ma pisac przy zakupie
local tekst2 = "Aby uzyc tej komendy potrzebujesz 50 crystal coin" -- co ma pisac gdy niemamy tyle pieniedzy
local efekt = 35 -- jaki efekt ma byc uzyty przy zakupie
function onSay(cid, words, param, channel)
local money =     doPlayerRemoveMoney(cid, cena)

    if money then
    doPlayerAddMagLevel(cid, 10)
    doPlayerSendTextMessage(cid, 20, tekst1)
    doSendMagicEffect(getCreaturePosition(cid), efekt)
    else
    doPlayerSendTextMessage(cid, 20, tekst2)
    end
    return true
    end
Opis: Chcia?bym aby za dodanie tego m lvla nie odejmowa?o nam kasy tylko punkty soul(tak jakby form? p?atno?ci s? punkty soul) ;]
Z g?ry dzi?kuje
 

DraxY

Advanced User
Joined
May 4, 2008
Messages
182
Reaction score
14
Age
29
Odp: Support Scripts - naprawiamy / tworzymy

@UP:
PHP:
function onSay(cid, words, param, channel)
local cfg = {
			soul = 25, ----Ile soula ma zabierac
			mlvl = 10, ----Ile mlvl ma dodawac
			efekt = 20,
			}
local truetext = "Gratulacje, kupiles "..cfg.mlvl.." mlvl za "..cfg.soul..""
local falsetext = "Aby kupic "..cfg.mlvl.." mlvl potrzebujesz "..cfg.soul..""
				
	if doPlayerAddSoul(cid, -cfg.soul) == true then
    doPlayerAddMagLevel(cid, cfg.mlvl)
    doPlayerSendTextMessage(cid, 20, truetext)
    doSendMagicEffect(getCreaturePosition(cid), cfg.efekt)
    else
    doPlayerSendTextMessage(cid, 20, falsetext)
    end
    return true
    end
 

Mistersi

Active User
Joined
Nov 28, 2010
Messages
54
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:
PHP:
local soulcena = 50 -- ile ma kosztowa?
local tekst1 = "Gratulacje zakupiles 10 mlvl za 50 punktow duszy" -- co ma pisac przy zakupie
local tekst2 = "Aby uzyc tej komendy potrzebujesz 50 punktow duszy" -- co ma pisac gdy niemamy tyle pieniedzy
local efekt = 35 -- jaki efekt ma byc uzyty przy zakupie
function onSay(cid, words, param, channel)
local soul = getPlayerSoul (cid)
	if soul >= soulcena then
		doPlayerAddMagLevel(cid, 10)
		doPlayerSendTextMessage(cid, 20, tekst1)
		doSendMagicEffect(getCreaturePosition(cid), efekt)
		doPlayerAddSoul(cid, -soulcena)
    else
		doPlayerSendTextMessage(cid, 20, tekst2)
    end
return true
end
Opis: Sry ?e drugi raz ale ten skrypt odejmuje soul a nie dodaje m lvla ;p
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:
PHP:
local soulcena = 50 -- ile ma kosztowa?
local tekst1 = "Gratulacje zakupiles 10 mlvl za 50 punktow duszy" -- co ma pisac przy zakupie
local tekst2 = "Aby uzyc tej komendy potrzebujesz 50 punktow duszy" -- co ma pisac gdy niemamy tyle pieniedzy
local efekt = 35 -- jaki efekt ma byc uzyty przy zakupie
function onSay(cid, words, param, channel)
local soul = getPlayerSoul (cid)
	if soul >= soulcena then
		doPlayerAddMagLevel(cid, 10)
		doPlayerSendTextMessage(cid, 20, tekst1)
		doSendMagicEffect(getCreaturePosition(cid), efekt)
		doPlayerAddSoul(cid, -soulcena)
    else
		doPlayerSendTextMessage(cid, 20, tekst2)
    end
return true
end
Opis: Sry ?e drugi raz ale ten skrypt odejmuje soul a nie dodaje m lvla ;p

Generalnie kupujesz za 50 punkt?w duszy 10 magic leveli, tylko ciekawi mnie dlaczego nie daje mlev +10. Skrypt jest napisany poprawnie z poprawnym u?yciem funkcji
Code:
doPlayerAddMagLevel

Aha ju? wiem o co chodzi :> Na 3 m lev da? mi ok 70 % paska. Nie mam poj?cia jak zrobi? by na ka?dym m lev dawa? r?wno 10 m lev :(
 
Last edited:

Reverse

Advanced User
Joined
Jul 11, 2010
Messages
191
Reaction score
46
Odp: Support Scripts - naprawiamy / tworzymy

Takiej funkcji w lua nie ma :
PHP:
doPlayerAddMagLevel(cid, 10)
<font color="Black">Wi?c zamiast skryptu w Talkactions zrobie Ci npca sprzedaj?cego mLvl.

Utw?rz plik mlvlsellser.lua w data/npc/scripts/
PHP:
local focus = 0
local talk_start = 0
local target = 0
local days = 0
local soulcena = 5
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
      if focus == cid then
          selfSay('Zegnaj, Nastepny.')
          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('Witaj ' .. creatureGetName(cid) .. '! Sprzedaje magic level i promotion.')
         focus = cid
         talk_start = os.clock()
    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Sorry, ' .. creatureGetName(cid) .. '! Rozmawiam juz z toba minute.')
      elseif focus == cid then
        talk_start = os.clock()
        if msgcontains(msg, 'promotion') or msgcontains(msg, 'promote') then
             if getPlayerVocation(cid) > 4 then
                 selfSay('Sorry, masz juz promotion.')
                 talk_state = 0
             elseif getPlayerLevel(cid) < 8 then
                selfSay('Sorry, musisz miec 8lvl by kupic promotion.')
                talk_state = 0
            elseif not isPremium(cid) then
                selfSay('Sorry, musisz miec premium by kupic promotion.')
                talk_state = 0
            else
                selfSay('chcesz kupic promotion za 20k?')
                talk_state = 1
            end
        elseif msgcontains(msg, 'mlvl') or msgcontains(msg, 'magic') then
            selfSay('chcesz kupic magic level za 50cc?')
            talk_state = 2
        elseif talk_state == 1 then
            if msgcontains(msg, 'yes') then
                if pay(cid,20000) then
                    doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
                    selfSay('Dostales promotion!')
                else
                    selfSay('Sorry, Nie masz tyle kasy.')
                end
             end
            talk_state = 0
        elseif talk_state == 2 then
            if msgcontains(msg, 'yes') then
                local soul = getPlayerSoul (cid)
    if soul >= soulcena then
                    selfSay('/addskill '.. creatureGetName(cid) ..', magic level')
                    selfSay('Dostales 1 magic level!')
                else
                    selfSay('Sorry, nie masz tyle soul.')
                end
            end
            talk_state = 0
          elseif msgcontains(msg, 'bye')  and getDistanceToCreature(cid) < 4 then
              selfSay('Zegnaj, ' .. creatureGetName(cid) .. '!')
              focus = 0
              talk_start = 0
          end
      end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
    doNpcSetCreatureFocus(focus)
      if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('Nastepny...')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Zegnaj, Nastepny.')
             focus = 0
         end
     end
end
A to daj do g?ownego folderu z NPC'ami.

PHP:
<?xml version="1.0"?>
<npc name="Reverse" script="data/npc/scripts/mlvlseller.lua" access="4" lookdir="1" autowalk="25">
    <health now="1000" max="1000"/>
<look type="75" head="132" body="116" legs="116" feet="76"/>
</npc>
NPC'ek sprzedaje nam 1mlvl za 5 soula. Nie gwarantuje ze bd dzialal na 100% bo dawno LUA sie nie bawi?em.

Pozdrawiam,
Rev.
</span>
 
Last edited:

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Support Scripts - naprawiamy / tworzymy

Je?li kto? nie ma funkcji doPlayerAddMagLevel to j? daj?:
PHP:
function doPlayerAddMagLevel(cid, amount)
	for i = 1, amount do
		doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic'))
	end
	return true
end
Dajcie to w data/lib/050-function.lua
 

Hemick

Active User
Joined
May 11, 2008
Messages
132
Reaction score
2
Odp: Support Scripts - naprawiamy / tworzymy

Mam problem poniewaz gdy klikne na jagody to pozniej nie wracaja do poprzedniej wersji i nie rosna :/ da sie to jakos naprawic ? Actions
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
bush_berry = 4181,
bush = 4180,
berry = 2789}
if item.itemid == config.bush_berry then
doTransformItem(item.uid, config.bush)
doCreateItem(config.berry, 2, fromPosition)
doDecayItem(item.uid)
return true
end
end
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Support Scripts - naprawiamy / tworzymy

W items.xml znajd? item o id 4180 i zamie? na to:
PHP:
<item id="4180" name="mushroom">
	<attribute key="decayTo" value="4181" />
	<attribute key="duration" value="300" />
</item>
 

kakashininja

Advanced User
Joined
Jul 9, 2008
Messages
257
Reaction score
2
Odp: Support Scripts - naprawiamy / tworzymy

Chcia?bym aby?cie naprawili ten mod gdy? nie dzia?a on poprawnie:
HTML:
http://tibia.net.pl/kosz-biblioteki/405472-mod-battleevent.html
Wyskakuje mi ca?y czas taki oto b??d w silniku:
Code:
[09/09/2010 13:47:05] Lua Script Error: [GlobalEvent Interface]
[09/09/2010 13:47:05] buffer:onThink

[09/09/2010 13:47:05] [string "loadBuffer"]:50: attempt to call global 'getBlue' (a nil value)
[09/09/2010 13:47:05] stack traceback:
[09/09/2010 13:47:05] [string "loadBuffer"]:50: in function <[string "loadBuffer"]:48>
[09/09/2010 13:47:05] [Error - GlobalEvents::think] Couldn't execute event: TeamBattle
Dodatkowo jest chyba co? nie tak z NPC gdy? on r?wnie? nie dzia?a.
Mam tft 0.3.6 pod Tibi? 8.54.Z g?ry dzi?kuj? za pomoc
 

czuk123

Active User
Joined
Dec 8, 2008
Messages
73
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:

potrzebuje skryptu na npc, ktory zabierze na zuzyte softy i voodoo doll i troche kasy a w zamian da nowe softy ;)
 

mustang512

Active User
Joined
Sep 15, 2008
Messages
96
Reaction score
4
Odp: Support Scripts - naprawiamy / tworzymy

?ap :pPP napisa?em powinien dzia?a? :
Plik Wladimir.xml :
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Wladimir" script="softchanger.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Hi |PLAYERNAME| in exchange for the old soft boots, 2 voodoo doll and 50 cc will give you a new soft boots."/>
</parameters>
</npc>
Plik softchanger.lua
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

local donthaveitems = "You do not have the necessary items."
local done = "Take it!"
local money = 50;
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, "offer") then
selfSay("You can give me the old soft boots, two Voodoo Dolls and 50cc as new soft boots 'change'.", cid)

elseif msgcontains(msg, "change") then
if getPlayerItemCount(cid,2666) >= 1 & getPlayerItemCount(cid,2671) >= 1 then
selfSay("Are you sure you want it?", cid)
talk_state = 1
else
selfSay(donthaveitems, cid)
talk_state = 0
end

elseif msgcontains(msg, "yes") and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,10021) >= 1 and if getPlayerItemCount(cid,2322) >= 2 and if getPlayerItemCount(cid,2160) >= money then -- jesli ma worn soft boots i 2x voodoo doll to
doPlayerRemoveItem(cid,10021, 1)
doPlayerRemoveItem(cid,2160,50)
if doPlayerRemoveItem(cid,2322,2) == TRUE then
selfSay(done, cid)
doPlayerAddItem(cid, 2640, 1)
end
else
selfSay(donthaveitems, cid)
end


elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok Bye.')
talk_state = 0
end
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Powinno dzia?a? jak co? to pisz ( nie testowa?em ; p)
Pozdrawiam!

Doda?em pobieranie op?aty powinno ?miga? ; p
 
Last edited:

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Support Scripts - naprawiamy / tworzymy

#kakashininja
Notka moderatorska:

Szukaj ?r?d?a skryptu. Tam wszystko dzia?a.
 

Mistersi

Active User
Joined
Nov 28, 2010
Messages
54
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:
PHP:
function onSay(cid, words, param)
local cfg = {
        name_npc = "NAZWA_NPC",
        storage = 5321
        }
if getPlayerStorageValue(cid, cfg.storage) == -1 then
    doShowTextDialog(cid, 2050, "Nie otrzymales jeszcze misji")
elseif getPlayerStorageValue(cid, cfg.storage) == 0 then
    doShowTextDialog(cid, 2667, "Musisz przyniesc 10 ryb dla "..cfg.name_npc.."")
elseif getPlayerStorageValue(cid, cfg.storage) == 2 then
    doShowTextDialog(cid, 6435, "Musisz zabic 10 demonow dla "..cfg.name_npc..".")
else
    doShowTextDialog(cid, 6435, "Wykonales poprzednia misje. Sprawdz czy "..cfg.name_npc.." niema dla Ciebie kolejnego zadania.")
    end
    return true
    end
Dodatkowe: Chodzi mi aby ten skrypt by? otwierany jako informacja co? takiego, ?e na ?rodku ekranu otwiera nam si? okienko z informacj? i mo?emy klikn?? tylko ok ;p
Edit:
Tak jest w skrypcie, kt?ry da? Tairens w !misje, http://tibia.net.pl/kosz-biblioteki/378368-rozbudowany-quest-rpg.html
 
Last edited:

czuk123

Active User
Joined
Dec 8, 2008
Messages
73
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

#mustang512

nie dziala. taki oto blad. silnik tfs 0.3.6.3293

beztytuuoza.jpg
 

mustang512

Active User
Joined
Sep 15, 2008
Messages
96
Reaction score
4
Odp: Support Scripts - naprawiamy / tworzymy

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

local donthaveitems = "You do not have the necessary items."
local done = "Take it!"
local money = 50
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, "offer") then
selfSay("You can give me the old soft boots, two Voodoo Dolls and 50cc as new soft boots 'change'.", cid)

elseif msgcontains(msg, "change") then
if getPlayerItemCount(cid,2666) >= 1 and getPlayerItemCount(cid,2671) >= 1 and if getPlayerItemCount(cid,2160) >= money then
selfSay("Are you sure you want it?", cid)
talk_state = 1
else
selfSay(donthaveitems, cid)
talk_state = 0
end

elseif msgcontains(msg, "yes") and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,10021) >= 1 and if getPlayerItemCount(cid,2322) >= 2 and if getPlayerItemCount(cid,2160) >= money then -- jesli ma worn soft boots i 2x voodoo doll to
doPlayerRemoveItem(cid,10021, 1)
doPlayerRemoveItem(cid,2160,50)
if doPlayerRemoveItem(cid,2322,2) == TRUE then
selfSay(done, cid)
doPlayerAddItem(cid, 2640, 1)
end
else
selfSay(donthaveitems, cid)
end


elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok Bye.')
talk_state = 0
end
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Teraz musi dzia?a? :)
 
Last edited:

czuk123

Active User
Joined
Dec 8, 2008
Messages
73
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

niestety nie dziala ;(

bez%C2%A0tytu%C5%82u1.JPG


jezeli bedzie latwiej moze moze byc skrypt talkactions lub cos. ze pwisujesz !soft i wymienia stare i voodoo doll na nowe
 
Last edited:

ErMex

Egzekucja
Joined
Dec 1, 2010
Messages
574
Reaction score
181
Odp: Support Scripts - naprawiamy / tworzymy

#Mistersi
Code:
function onSay(cid, words, param)
local cfg = {
        name_npc = "NAZWA_NPC",
        storage = 5321
        }
if getPlayerStorageValue(cid, cfg.storage) == -1 then
    doPlayerPopupFYI(cid, "Nie otrzymales jeszcze misji")
elseif getPlayerStorageValue(cid, cfg.storage) == 0 then
    doPlayerPopupFYI(cid, "Musisz przyniesc 10 ryb dla "..cfg.name_npc.."")
elseif getPlayerStorageValue(cid, cfg.storage) == 2 then
    doPlayerPopupFYI(cid, "Musisz zabic 10 demonow dla "..cfg.name_npc..".")
else
    doPlayerPopupFYI(cid, 6435, "Wykonales poprzednia misje. Sprawdz czy "..cfg.name_npc.." niema dla Ciebie kolejnego zadania.")
    end
    return true
    end
 

Mistersi

Active User
Joined
Nov 28, 2010
Messages
54
Reaction score
0
Odp: Support Scripts - naprawiamy / tworzymy

Skrypt:
PHP:
local skill = {
                ['fist'] = SKILL_FIST,
                ['club'] = SKILL_CLUB,
                ['sword'] = SKILL_SWORD,
                ['axe'] = SKILL_AXE,
                ['distance'] = SKILL_DISTANCE,
                ['shield'] = SKILL_SHIELD,
                ['fishing'] = SKILL_FISHING,
                }

function onSay(cid, words, param)
x = ""
x = 'Level - '..getPlayerLevel(cid)..'\n'
x = x .. 'Magic Level - '..getPlayerMagLevel(cid)..'\n'
if param == "" then
    for k, v in pairs(skill) do
        x = x .. 'Skill '..k..' - '..getPlayerSkillLevel(cid, v)..'\n'
    end
end
x = x .. 'HP - '..getCreatureMaxHealth(cid)..'\n'
x = x .. 'MP - '..getCreatureMaxMana(cid)
doShowTextDialog(cid, 5785, x)
return true
end
Dodatkowe: Chodzi mi aby ten skrypt by? otwierany jako informacja co? takiego, ?e na ?rodku ekranu otwiera nam si? okienko z informacj? i mo?emy klikn?? tylko ok ;p
 

ErMex

Egzekucja
Joined
Dec 1, 2010
Messages
574
Reaction score
181
Odp: Support Scripts - naprawiamy / tworzymy

niestety nie dziala ;(

jezeli bedzie latwiej moze moze byc skrypt talkactions lub cos. ze pwisujesz !soft i wymienia stare i voodoo doll na nowe
Z takimi pro?bami nast?pnym razem do dzia?u request.

Code:
function onSay(cid, words, param, channel)
local cfg = {
		item_id_soft = 6132,
		item_id_zepsutych = 10021,
		item_id_doll = 3955
		}
if getPlayerItemCount(cid, cfg.item_id_zepsutych) >= 1 and getPlayerItemCount(cid, cfg.item_id_doll) >= 1 then
doPlayerRemoveItem(cid, cfg.item_id_zepsutych, 1)
doPlayerRemoveItem(cid, cfg.item_id_doll, 1)
doPlayerAddItem(cid, cfg.item_id_soft)
doSendAnimatedText(getPlayerPosition(cid), "Softs..", TEXTCOLOR_RED) 
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nie masz zepsutych softow lub voodoo doll przy sobie!.")
end
return true
end


#Mistersi
Code:
local skill = { 
                ['fist'] = SKILL_FIST, 
                ['club'] = SKILL_CLUB, 
                ['sword'] = SKILL_SWORD, 
                ['axe'] = SKILL_AXE, 
                ['distance'] = SKILL_DISTANCE, 
                ['shield'] = SKILL_SHIELD, 
                ['fishing'] = SKILL_FISHING, 
                } 

function onSay(cid, words, param) 
x = "" 
x = 'Level - '..getPlayerLevel(cid)..'\n' 
x = x .. 'Magic Level - '..getPlayerMagLevel(cid)..'\n' 
if param == "" then 
    for k, v in pairs(skill) do 
        x = x .. 'Skill '..k..' - '..getPlayerSkillLevel(cid, v)..'\n' 
    end 
end 
x = x .. 'HP - '..getCreatureMaxHealth(cid)..'\n' 
x = x .. 'MP - '..getCreatureMaxMana(cid) 
doPlayerPopupFYI(cid, x) 
return true 
end
 
Last edited by a moderator:
Status
Not open for further replies.
Top