Anasayfa
UO Sunucular
Forumlar
Profilim
UO-Developer.COM
[itemdef i_poisoning_item] 
id = i_memory
type = t_eq_script
layer = layer_special
weight = 0
name = custom poison

on=@equip
tag.poison = <var.poison>
var.poison =
tag.target = <var.target>
var.target =
link = <src.uid>
var.mua_color = 00790
link.colormessageua You begin to apply the poison...
timer = 5

on=@unequip
link.newitem i_bottle_empty
link.act.bounce
return 0

on=@timer
if (<link.uid.<tag.target>.type> == t_food)
   if (<eval <var.succeed>> == 1)
      tryp 0 link.uid.<tag.target>.type = t_food_poison
      if (<eval <link.uid.<tag.poison>.more2>/100> == 4)
         tryp 0 link.uid.<tag.target>.morem = 4
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 5)
         tryp 0 link.uid.<tag.target>.morem = 3
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 9)
         tryp 0 link.uid.<tag.target>.morem = 2
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 10)
         tryp 0 link.uid.<tag.target>.morem = 1
      endif
      var.mua_color = 00790
      link.colormessageua You apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   else
      var.mua_color = 00790
      link.colormessageua You fail to apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   endif
elseif (<link.uid.<tag.target>.is_blade>)
   if (<eval <var.succeed>> == 1)
      if (<eval <link.uid.<tag.poison>.more2>/100> == 4)
         tryp 0 link.uid.<tag.target>.morem = 218
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 5)
         tryp 0 link.uid.<tag.target>.morem = 196
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 9)
         tryp 0 link.uid.<tag.target>.morem = 164
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 10)
         tryp 0 link.uid.<tag.target>.morem = 112
      endif
      var.mua_color = 00790
      link.colormessageua You apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   else
      var.mua_color = 00790
      link.colormessageua You fail to apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   endif
elseif (<link.uid.<tag.target>.type> == t_container)
   if (<eval <var.succeed>> == 1)
      tryp 0 link.uid.<tag.target>.type = t_trap_poison
      if (<eval <link.uid.<tag.poison>.more2>/100> == 4)
         tryp 0 link.uid.<tag.target>.morem = 4
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 5)
         tryp 0 link.uid.<tag.target>.morem = 3
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 9)
         tryp 0 link.uid.<tag.target>.morem = 2
      elseif (<eval <link.uid.<tag.poison>.more2>/100> == 10)
         tryp 0 link.uid.<tag.target>.morem = 1
      endif
      var.mua_color = 00790
      link.colormessageua You apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   else
      var.mua_color = 00790
      link.colormessageua You fail to apply the poison to the object.
      tryp 0 link.uid.<tag.poison>.remove
   endif
endif
remove
return 1

[typedef t_trap_poison]
on=@dclick
src.poison_me <morem>
src.sayu *coughs*
morem =
type = t_container
return 0

[typedef t_food_poison]
on=@dclick
src.poison_me <morem>
src.emote eat some <name>
remove
return 1

[function poison_me]
if (<restest 1 i_poison>)
   if (<findid(i_poison).morem> <= <args>)
      return 0
   else
      findid(i_poison).remove
   endif
endif
if (<args> == 1)
   var.level = Deadly
elseif (<args> == 2)
   var.level = Greater
elseif (<args> == 3)
   var.level = Regular
elseif (<args> == 4)
   var.level = Lesser
endif
newitem i_poison
act.tag.level = <var.level>
var.level =
act.link = <uid>
act.equip
act.cont = <uid>
sysmessage You have been poisoned!

[itemdef i_poison]
name = custom poison
id = i_rune_poison
type = t_eq_script
weight = 0
layer = 99

on=@equip
link = <cont.uid>
tag.link = <link>
tag.link2 = <src.uid>
if strmatch("<tag.level>", "Deadly")
   morem = 1
   morez = 5
   timer = <morez>
elseif strmatch("<tag.level>", "Greater")
   morem = 2
   morez = 10
   timer = <morez>
elseif strmatch("<tag.level>", "Regular")
   morem = 3
   morez = 10
   timer = <morez>
elseif strmatch("<tag.level>", "Lesser")
   morem = 4
   morez = 15
   timer = <morez>
endif

on=@timer
link = <cont.uid>
if (<morem> == 1)
   if (<link.hits> <= 25)
      if (<link.stamina> >= 20)
         link.stamina = <link.stamina>+-20
      else
         link.stamina = 0
      endif
      if (<link.hits> <= 8)
         link.hits = 0
      else
         link.hits = <link.hits> +- 8
      endif
   else
      var.dam = <link.hits>/8
      if (<eval <var.dam>> < 8)
         var.dam = 8
      endif
      link.hits = <link.hits> +- <eval <var.dam>>
   endif
   link.damage 1
   link.bark 3
   if (<link.npc> == 0)
      link.sayua 00020,0,0,0 *You feel extremely weak and are in severe pain!*
   else
      var.speech = <link.speechcolor>
      link.speechcolor = 00020
      link.sayu *You feel extremely weak and are in severe pain!*
      link.speechcolor = <var.speech>
      var.speech =
   endif
elseif (<morem> == 2)
   var.dam = <link.hits>/16
   if (<eval <var.dam>> < 7)
      var.dam = 7
   endif
   if (<link.hits> <= <eval <var.dam>>)
      link.hits = 0
   endif
   link.hits = <link.hits> +- <eval <var.dam>>
   link.damage 1
   if (<link.npc> == 0)
      link.sayua 00020,0,0,0 *You begin to feel pain throughout your body!*
   else
      var.speech = <link.speechcolor>
      link.speechcolor = 00020
      link.sayu *You begin to feel pain throughout your body!*
      link.speechcolor = <var.speech>
      var.speech =
   endif
elseif (<morem> == 3)
   var.dam = <link.hits>/32
   if (<eval <var.dam>> < 5)
      var.dam = 5
   endif
   if (<link.hits> <= <eval <var.dam>>)
      link.hits = 0
   endif
   link.hits = <link.hits> +- <eval <var.dam>>
   link.damage 1
   if (<link.npc> == 0)
      link.sayua 00020,0,0,0 *You feel disoriented and nauseous!*
   else
      var.speech = <link.speechcolor>
      link.speechcolor = 00020
      link.sayu *You feel disoriented and nauseous!*
      link.speechcolor = <var.speech>
      var.speech =
   endif
elseif (<morem> == 4)
   var.dam = <link.hits>/40
   if (<eval <var.dam>> < 3)
      var.dam = 3
   endif
   if (<link.hits> <= <eval <var.dam>>)
      link.hits = 0
   endif
   link.hits = <link.hits> +- <eval <var.dam>>
   link.damage 1
   if (<link.npc> == 0)
      link.sayua 00020,0,0,0 *You feel a bit nauseous...*
   else
      var.speech = <link.speechcolor>
      link.speechcolor = 00020
      link.sayu *You feel a bit nauseous...*
      link.speechcolor = <var.speech>
      var.speech =
   endif
endif
if (<link.hits> == 0)
   remove
   return 1
endif
timer = <morez>
return 1

[function poison_calc] //USED TO CALUCLATE SUCCESS AND FAIL
var.succeed = 0
if (<poisoning> >= 900)
   if (rand(2) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
elseif (<poisoning> >= 800) && (<poisoning> < 900)
   if (rand(3) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
elseif (<poisoning> >= 700) && (<poisoning> < 800)
   if (rand(4) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
elseif (<poisoning> >= 600) && (<poisoning> < 700)
   if (rand(5) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
elseif (<poisoning> >= 500) && (<poisoning> < 600)
   if (rand(6) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
elseif (<poisoning> >= 400) && (<poisoning> < 500)
   if (rand(7) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
else
   if (rand(10) == 1)
      var.succeed = 1
   else
      var.succeed = 0
   endif
endif

UO-Dev SPONSOR

Paylaş

XFacebook

Faydalı mı?

Bu içerik size yardımcı oldu mu?

UO-Dev SPONSOR

Henüz yorum yapılmamış. Yorum yazabilmek için giriş yapmanız gerekir.

Üyelerin oylama ortalaması (10 dışında) :

Henüz Oylanmamış

Oylar: 0

Paylaş

XFacebook

Faydalı mı?

Bu içerik size yardımcı oldu mu?