Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

hantelki skrypt


6no6danek6

Rekomendowane odpowiedzi

Opublikowano
function exhaust(cid, storevalue, exhausttime) storevalue = 2679 exhausttime = 5
newExhaust = os.time()
oldExhaust = getPlayerStorageValue(cid, storevalue)
if (lastexhaust == nil or lastexhaust < 0) then
lastexhaust = 0 end if (exhausttime == nil or exhausttime < 0)
then exhausttime = 1 end diffTime = os.difftime(newExhaust, oldExhaust)
if (diffTime >= exhausttime) then setPlayerStorageValue(cid, storevalue, newExhaust)
return 1
else
return 0
end
end


function onUse(cid, item, frompos, item2, topos)
if (exhaust(cid, 1000, 1) > 0) then
if item.itemid == 2625 then
level = getPlayerLevel(cid)
mana = getPlayerHealth(cid)
doPlayerAddHealth(cid, 999999)
newmana = getPlayerHealth(cid)
doPlayerAddHealth(cid,- newmana + mana)
if mana > newmana/5 then
doPlayerAddHealth(cid,- newmana/5)
doPlayerAddSkillTry(cid,0,level)
end
end
 

 

 

 
Jest to skrypt do hantelków(jeśli ich używamy daje nam+ do skill a zabiera hp I teraz pojawia sie problem gdyż, no hantle gdy na nie klikamy pojawia sie animacja uzywania lecz nic pozatym. Widzicie tu jakiś błąd?
Czy może po prostu jak robie mape w action id lub unique id trzeba cos dodać ? 
Opublikowano

sam to pisales ?

 

nawet nie chce mi sie szukac tu bledow bo ten kod jest dziwny, napisze szybciej swoj i dam edit

 

a tak ps dawaj kod w code a nie w cytacie

local ilehp = getPlayerHealth(cid) / 20     -- 5% hp co użycie

function onUse(cid, item, frompos, item2, topos)
if exhaustion.get(cid, 1000) == false then
if item.itemid == 2625 then
   doSendMagicEffect(cid, 2)
   doPlayerAddHealth(cid, -ilehp)
   -- dodaj sobie funkcje od skilla
end
end
doPlayerSendCancel(cid,"Wait " ..exhaustion.get(cid, 1000).. " s")
end
Opublikowano
local maxhp = getPlayerMaxHealth(cid)
local ilehp = maxhp / 20 -- 5% hp co użycie

function onUse(cid, item, frompos, item2, topos)
if exhaustion.get(cid, 1000) == false then
if item.itemid == 2625 then
doSendMagicEffect(cid, 2)
doPlayerAddHealth(cid, -ilehp)
-- dodaj sobie funkcje od skilla
end
end
doPlayerSendCancel(cid,"Wait " ..exhaustion.get(cid, 1000).. " s")
end

sprawdz to

Opublikowano

no to sie dziwisz ze nie dziala jak ja napisalem pod tfs 0.3.6+ ( 8.54+)

 

musisz mi powiedzieć jaki masz silnik devland, yourots zebym mogl znalezc liste funkcji lua pod niego.

 

Sprawdz czy nie masz pliku z taką listą w folderze z ots

Opublikowano
To powinno być to.

 

 

..::DevLand Readme::..

----------------------

Version 0.993

----------------------

- Added Level doors (RL TIBIA)

You need add files to scripts (leveldoor, leveldoor2, leveldoor3, leveldoor4),

and add copy this actions.xml

(If you want Level to Door you need only add on it ACTION Id 1000+reqlevel, like in YurOTS).

______________________

- DEPOT TILES

- ACTION ontile/offtile

- Action onMove

- BEDS working only in HOUSE

- Frist attack?? (I mean your frist attack will be after 1s not 2s)

- Shield working (50%) Taking Defense only from right hand)

- When monster poison You you will see "You was poisioned" or something like it.

- Other Premium system (Like in NeverLand) if you want buy premmy you need say "!buypremmy" (configured in config.lua)

-- How many premmy days the player get when say !buypremmy

***********************************************

manypremmydays = 10

 

-- How many the player pay when say !buypremmy

prricepremmy = 10000

***********************************************

- Fixed double Damages from Fields

- Fixed Party Bug (i think evrybody know about it)

- Removed Function gmhits on/off (remove it from old config.lua)

- Fixed Some Random Crashes (they was been sometimes when somebody die by UE)

- FIXED destroy item by water etc (tar destroying too, and more types of water)

- Fixed Crash with piano (music.lua)

- Fixed Exana Pox (now its take 30 mana)

- Fixed access 1 and 2 (they was not have skull when atack somebody, and magic level was not growing up)

----------------------

Version 0.993b

----------------------

- Level Doors Fixed (they was not taking level from action id, all levels was can enter)

- DEpot Tiles and Level Doors changing when someone logout on them 

- Other Paralyze System (someone tell me the old was crashing serv)   HotServ Source

 ----------------------------------------------------------------------------------------

|             WHAT YOU NEED TO DO...

|1*REply Your old leveldoor, leveldoor2,3,4 for that on this version

|2*Remove from spells.xml Paralyze, Spell Paralyze, and line in monster with this spell.

|3*If you want that monster can paralyze add this --->"   paralyze="1"   "<--- in monster file before experience.

|4*Ofcourse change devland.exe 

 ----------------------------------------------------------------------------------------

Version 0.993c

------------------------

- LeveL doorS showing reqLevel... (if you dont have it)

- Fixed Bug when you die under 4 level server Crash... (you just need only have properly configured rooktemple in config.lua or if not it will still crashing)

 

-----------------------

Version 0.993c

------------------------

FixeD Crashing witch summons 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...