Code: Select all
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Event("MenuOption", "3")
{
SetContext( $gTargetID )
$tHP = $gPlayerVar[2]
$tHPM = $gPlayerVar[3]
$tAtt = $gPlayerVar[4]
$tDef = $gPlayerVar[5]
RestoreContext()
osdcreate(OSDLIST, "PvP", "Chalenged %target% to Battle")
osdSet("BlockEscape")
osdadditem(OSDMINHEIGHT, "", "300")
osdaddat(osdIMAGE, 0, 5, 590, 290, "", "http://i48.tinypic.com/wkiidx.jpg")Papper
IF ($gTargetID = 2)
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i50.tinypic.com/npfmup.jpg")BLAZE
}
ELSE
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i45.tinypic.com/2nulzdz.jpg")
}
osdaddat(OSDBIGTEXT, 235, 25, 330, 20, "", "You Chalenge %target%")
osdaddat(OSDBIGTEXT, 25, 225, 200, 20, "", "HP:$tHP/$tHPM")
osdaddat(OSDBIGTEXT, 25, 245, 200, 20, "", "ATT:$tAtt")
osdaddat(OSDBIGTEXT, 25, 265, 200, 20, "", "DFF:$tDef")
osdaddat(OSDBIGTEXT, 235, 130, 330, 20, "", "__________________________")
osdaddat(OSDBIGTEXT, 235, 155, 330, 20, "", "What Will You Do")
osdaddat(OSDIMAGE, 235, 215, 330, 30, "1|$gTargetID", "http://i46.tinypic.com/33yna5c.jpg")ATTACK
osdaddat(OSDIMAGE, 235, 250, 330, 30, "2|$gTargetID", "http://i49.tinypic.com/2z6f495.jpg")DEFEND
osdactivate()
}
------------------------------------------------------------------------------
EVENT("osdselect", "PvP:1")
{
$YHP = $gPlayerVar[2]
$YHPM = $gPlayerVar[3]
$YAtt = $gPlayerVar[4]
$YDef = $gPlayerVar[5]
SetContext( $gTargetID )
$tHP = $gPlayerVar[2]
$tHPM = $gPlayerVar[3]
$tAtt = $gPlayerVar[4]
$tDef = $gPlayerVar[5]
RestoreContext()
$GD = $YAtt - $tDef
$TD = $TDef - $YAtt
IF ($YHP > 1)
{
IF ($THP > 1)
{
IF ($YAtt > $tDef)
{
$tHP = $tHP - $GD
osdcreate(OSDLIST, "PvP", "BATTLE")
osdSet("BlockEscape")
osdadditem(OSDMINHEIGHT, "", "300")
osdaddat(osdIMAGE, 0, 5, 590, 290, "", "http://i48.tinypic.com/wkiidx.jpg")Papper
IF ($gTargetID = 2)
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i50.tinypic.com/npfmup.jpg")BLAZE
}
ELSE
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i50.tinypic.com/2w4n120.jpg")
}
osdaddat(OSDBIGTEXT, 235, 25, 330, 20, "", "%target% takes $GD damage form you.")
osdaddat(OSDBIGTEXT, 25, 225, 200, 20, "", "HP:$tHP/$tHPM")
osdaddat(OSDBIGTEXT, 25, 245, 200, 20, "", "ATT:$tAtt")
osdaddat(OSDBIGTEXT, 25, 265, 200, 20, "", "DFF:$tDef")
osdaddat(OSDIMAGE, 235, 215, 330, 30, "1|$gTargetID", "http://i46.tinypic.com/33yna5c.jpg")ATTACK
osdaddat(OSDIMAGE, 235, 250, 330, 30, "2|$gTargetID", "http://i49.tinypic.com/2qtl6l4.jpg")RUN
osdactivate()
SetContext( $gTargetID )
$gPlayerVar[2] = $tHP
RestoreContext()
}
ELSE
{
$YHP = $YHP - $TD
osdcreate(OSDLIST, "PvP", "BATTLE")
osdSet("BlockEscape")
osdadditem(OSDMINHEIGHT, "", "300")
osdaddat(osdIMAGE, 0, 5, 590, 290, "", "http://i48.tinypic.com/wkiidx.jpg")Papper
IF ($gTargetID = 2)
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i50.tinypic.com/npfmup.jpg")BLAZE
}
ELSE
{
osdaddat(OSDIMAGE, 25, 20, 200, 200, "", "http://i50.tinypic.com/2w4n120.jpg")
}
osdaddat(OSDBIGTEXT, 235, 25, 330, 20, "", "You take $TD damage form %target%.")
osdaddat(OSDBIGTEXT, 25, 225, 200, 20, "", "HP:$tHP/$tHPM")
osdaddat(OSDBIGTEXT, 25, 245, 200, 20, "", "ATT:$tAtt")
osdaddat(OSDBIGTEXT, 25, 265, 200, 20, "", "DFF:$tDef")
osdaddat(OSDIMAGE, 235, 215, 330, 30, "1|$gTargetID", "http://i46.tinypic.com/33yna5c.jpg")ATTACK
osdaddat(OSDIMAGE, 235, 250, 330, 30, "2|$gTargetID", "http://i49.tinypic.com/2qtl6l4.jpg")RUN
osdactivate()
$gPlayerVar[2] = $YHP
}
}
ELSE
{
$gPlayerVar[13] = $gPlayerVar[13] +1
SetContext( $gTargetID )
$gPlayerVar[14] = $gPlayerVar[14] + 1
RestoreContext()
}
}
ELSE
{
$gPlayerVar[14] = $gPlayerVar[14] +1
SetContext( $gTargetID )
$gPlayerVar[13] = $gPlayerVar[13] + 1
RestoreContext()
}
}
-----------------------------------------------------------------------------
EVENT("osdselect", "PvP:2")
{
$gPlayerVar[14] = $gPlayerVar[14] +1
SetContext( $gTargetID )
$gPlayerVar[13] = $gPlayerVar[13] + 1
RestoreContext()
*msg %player% you deside to run away
*msg %target% %player% ran away
}