Skip to content

Commit

Permalink
Merge branch 'develop' into dupe-command-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xoduz committed Apr 27, 2024
2 parents 8499cbf + d93c9f3 commit 370430a
Show file tree
Hide file tree
Showing 26 changed files with 329 additions and 181 deletions.
1 change: 1 addition & 0 deletions data/dfndata/items/containers/leather.dfn
Expand Up @@ -104,6 +104,7 @@ colorlist=37
dyeable=0
decay=1
good=5
origin=lbr
script=5058// bagofsending.js
script=2203// charges_left_tooltip.js
}
Expand Down
5 changes: 5 additions & 0 deletions data/dfndata/items/gear/weapons/missile_weapons.dfn
Expand Up @@ -12,6 +12,11 @@ good=23
origin=td
}

[bola]
{
get=0x26AC
}

//------------------------------------------------------------------------------------------------//

// SAMURAI EMPIRE
Expand Down
2 changes: 2 additions & 0 deletions data/dfndata/items/magic/misc_magic.dfn
Expand Up @@ -117,6 +117,7 @@ weight=1000
value=2 1
good=28
sectionid=0x0e2d
origin=uo
script=5056// crystalball.js
}

Expand Down Expand Up @@ -146,6 +147,7 @@ dir=1
weight=1000
value=2 1
good=28
origin=lbr
script=5057// ballofpetsummoning.js
script=2203// charges_left_tooltip.js
}
Expand Down
3 changes: 3 additions & 0 deletions data/dfndata/items/misc/consumables.dfn
Expand Up @@ -252,6 +252,7 @@ colour=0x487
pileable=1
amount=1
decay=1
origin=sa
script=5060
custominttag=typeID 1
}
Expand Down Expand Up @@ -297,6 +298,7 @@ weight=01
color=0x0835
pileable=1
amount=1
origin=lbr
script=5059//powderoftranslocation.js
}

Expand All @@ -308,4 +310,5 @@ id=0x26B7
pileable=1
amount=1
decay=1
origin=lbr
}
1 change: 1 addition & 0 deletions data/dfndata/items/skills/tools/alchemy.dfn
Expand Up @@ -787,5 +787,6 @@ movable=1
pileable=1
decay=1
value=10637 5318
origin=lbr
script=5054
}
2 changes: 2 additions & 0 deletions data/dfndata/items/skills/tools/mining.dfn
Expand Up @@ -305,6 +305,7 @@ movable=1
pileable=1
decay=1
value=10637 5318
origin=lbr
script=5052
}

Expand All @@ -318,5 +319,6 @@ movable=1
pileable=1
decay=1
value=10637 5318
origin=lbr
script=5053
}
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.CSY
Expand Up @@ -2554,6 +2554,8 @@
2794=pro %i zlato
2795=Z trosek vylovíš nějaké drahokamy.
2796=* Tvé tělo se zmítá v křečích z elektrického šoku *
2797=Toto nemůžete použít při létání!
2798=Byli jste uzemněni.
// [2800-2999] House script
2800=Vlastník domu:
2801=VLASTNÍCI DOMU
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ENG
Expand Up @@ -2554,6 +2554,8 @@
2794=for %i gold
2795=You scrounge some gems from the wreckage.
2796=* Your body convulses from electric shock *
2797=You can't use this while flying!
2798=You have been grounded.
// [2800-2999] House script
2800=House Owner:
2801=CO-OWNERS
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.FRE
Expand Up @@ -2718,6 +2718,8 @@
2794=pour %i d'or
2795=Vous récupérez quelques pierres précieuses dans les décombres.
2796=* Votre corps convulse sous l'effet du choc électrique *
2797=Vous ne pouvez pas l'utiliser en vol !
2798=Vous avez été cloué au sol.
// [2800-2999] House script
2800=Propriétaire de la maison :
2801=CO-PARENTS
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.GER
Expand Up @@ -2554,6 +2554,8 @@
2794=für %i Gold
2795=Du schnappst dir ein paar Edelsteine aus den Trümmern.
2796=* Dein Körper verkrampft sich durch den Stromschlag *
2797=Sie können dies nicht während des Fliegens verwenden!
2798=Sie haben Hausverbot.
// [2800-2999] House script
2800=Hauseigentümer:
2801=HAUSBESITZER
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ITA
Expand Up @@ -2554,6 +2554,8 @@
2794=per %i oro
2795=Raccolgi alcune gemme dai rottami.
2796=* Il tuo corpo è in preda alle convulsioni a causa delle scosse elettriche.
2797=Non puoi usarlo mentre voli!
2798=Sei stato messo a terra.
// [2800-2999] House Scripts
2800=Proprietario della casa:
2801=COOPERATORI
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.POL
Expand Up @@ -2554,6 +2554,8 @@
2794=Za %i złota
2795=Zgarniasz trochę klejnotów z wraku.
2796=* Twoje ciało drży od porażenia prądem *.
2797=Nie możesz tego używać podczas lotu!
2798=Zostałeś uziemiony.
// [2800-2999] Skrypt domu
2800=Właściciel domu:
2801=WŁAŚCICIELE
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.PTG
Expand Up @@ -2554,6 +2554,8 @@
2794=para %i ouro
2795=Vocês procuram algumas pedras preciosas nos destroços.
2796=* Your body convulses from electric shock *
2797=Você não pode usar isto enquanto voa!
2798=Você foi castigado.
// [2800-2999] House script
2800=Possuidor da casa:
2801=CO-PROPRIETÁRIOS
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.SPA
Expand Up @@ -2554,6 +2554,8 @@
2794=por %i oro
2795=Buscas algunas gemas entre los escombros.
2796=* Tu cuerpo convulsiona por la descarga eléctrica *
2797=¡No puedes usar esto mientras vuelas!
2798=Has sido castigado.
// [2800-2999] Escritura de la casa
2800=Propietario de la casa:
2801=CO-OWNERS
Expand Down
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ZRO
Expand Up @@ -2554,6 +2554,8 @@
2794=for %i gold
2795=You scrounge some gems from the wreckage.
2796=* Your body convulses from electric shock *
2797=You can't use this while flying!
2798=You have been grounded.
// [2800-2999] House script
2800=House Owner:
2801=CO-OWNERS
Expand Down
23 changes: 11 additions & 12 deletions data/js/item/ballofpetsummoning.js
Expand Up @@ -115,6 +115,7 @@ function onCallback0( socket, myTarget)
socket.SysMessage( GetDictionaryEntry( 19054, socket.language )); // Only pets can be linked to this Crystal Ball of Pet Summoning.
return false;
}
iUsed.Refresh();
return false;
}

Expand All @@ -128,6 +129,10 @@ function SummonPet( pUser, iUsed )
var reCharges = parseInt( myCharges[1] );
var maxCharges = parseInt( myCharges[2] );

var iTime = GetCurrentClock();
var NextUse = iUsed.GetTempTag( "delay" );
var Delay = 15000;

if( charges == 0)
{
pUser.SysMessage( GetDictionaryEntry( 19055, socket.language )); // The Crystal Ball darkens. It must be charged before it can be used again.
Expand All @@ -148,7 +153,7 @@ function SummonPet( pUser, iUsed )
socket.SysMessage( GetDictionaryEntry( 19058, socket.language )); // The Crystal Ball fills with a grey mist. You are not the owner of the pet you are attempting to summon.
return false;
}
else if( iUsed.GetTempTag( "delay" ) == 1)
else if( ( iTime - NextUse ) < Delay )
{
socket.SysMessage( GetDictionaryEntry( 19059, socket.language )); // You must wait a few seconds before you can summon your pet.
return false;
Expand Down Expand Up @@ -180,8 +185,7 @@ function SummonPet( pUser, iUsed )
}

iUsed.SetTag( "charges", charges - requiredCharges + "|" + reCharges + "|" + maxCharges );
iUsed.SetTempTag( "delay", 1 );
iUsed.StartTimer( 15000, 0, true );
iUsed.SetTempTag( "delay", iTime.toString() );
socket.SysMessage( GetDictionaryEntry( 19060, socket.language )); // The Crystal Ball fills with a green mist. Your pet has been summoned.
}
}
Expand All @@ -208,14 +212,6 @@ function ReleasePet( petObj, petNum, pUser )
petObj.Follow( pUser );
}

function onTimer( iUsed, timerID )
{
if( timerID == 0 )
{
iUsed.SetTempTag( "delay", null );
}
}

function onContextMenuRequest( socket, targObj )
{
var Pet = CalcCharFromSer(parseInt( targObj.GetTag( "petSerial" )));
Expand Down Expand Up @@ -304,6 +300,7 @@ function onContextMenuSelect( socket, targObj, popupEntry )
socket.SysMessage( GetDictionaryEntry( 19062, socket.language )); // This crystal ball is no longer linked to a pet.
targObj.SetTag( "petSerial", null );
targObj.SetTag( "linked", null );
targObj.Refresh();
break;
}
return false;
Expand All @@ -312,6 +309,7 @@ function onContextMenuSelect( socket, targObj, popupEntry )
function onSpeechInput( pUser, targObj, pSpeech, pSpeechID )
{
var pSocket = pUser.socket;
var iUsed = pSocket.tempObj;
if( pSpeech == null || pSpeech == " " )
{
pSocket.SysMessage( GetDictionaryEntry( 9270, pSocket.language )); // That name is too short, or no name was entered.
Expand All @@ -330,8 +328,9 @@ function onSpeechInput( pUser, targObj, pSpeech, pSpeechID )
if( ValidateObject( targObj ))
{
targObj.name = pSpeech;
var tempMsg = GetDictionaryEntry( 19063, socket.language ); // The new name of the Pet is: %s
var tempMsg = GetDictionaryEntry( 19063, pSocket.language ); // The new name of the Pet is: %s
pSocket.SysMessage( tempMsg.replace( /%s/gi, targObj.name ));
iUsed.Refresh();
}
else
{
Expand Down
50 changes: 29 additions & 21 deletions data/js/item/bola.js
@@ -1,6 +1,10 @@
function onUseChecked( pUser, iUsed )
{
var socket = pUser.socket;
var iTime = GetCurrentClock();
var NextUse = iUsed.GetTempTag( "bolaDelayed" );
var Delay = 10000;

if ( pUser.visible == 1 || pUser.visible == 2 )
{
pUser.visible = 0;
Expand All @@ -25,23 +29,24 @@ function onUseChecked( pUser, iUsed )
pUser.SysMessage( GetDictionaryEntry( 2713, socket.language )); // You cannot use this while riding a mount.
return false;
}
if( pUser.GetTag( "bola" ) == null || pUser.GetTag( "bola" ) == 0)
else if( pUser.isflying )
{
socket.tempObj = iUsed;
pUser.SetTag( "bola", 1 );

//the addition of the false-flag in the EmoteMessage below tells the server to only
//send the message to this character
pUser.EmoteMessage( GetDictionaryEntry( 2714, socket.language ), false ); // * You begin to swing the bola...*
pUser.StartTimer( 3000, 0, true );
pUser.SysMessage( GetDictionaryEntry( 2797, socket.language )); // You can't use this while flying!
return false;
}
else if( pUser.GetTag( "bola" ) == 1 )
else if(( iTime - NextUse ) < Delay )
{
pUser.SysMessage( GetDictionaryEntry( 2715, socket.language )); // You have to wait a few moments before you can use another bola!
return false;
}
else
{
return true;
socket.tempObj = iUsed;
pUser.EmoteMessage( GetDictionaryEntry( 2714, socket.language )); // * You begin to swing the bola...*
var tempMsg = GetDictionaryEntry( 2720, socket.language ); // %s begins to menacingly swing a bola...
pUser.EmoteMessage( tempMsg.replace( /%s/gi, pUser.name ));
iUsed.SetTempTag( "bolaDelayed", iTime.toString() );
pUser.StartTimer( 3000, 0, true );
}
}
return false;
Expand All @@ -59,7 +64,7 @@ function onCallback0( socket, myTarget)
if( !socket.GetWord( 1 ) && myTarget.isChar )
{
// Don't allow throwing bolas at Young players, or Young players throwing bolas at other players
if( GetServerSetting( "YoungPlayerStatus" ))
if( GetServerSetting( "YoungPlayerSystem" ))
{
if(( !myTarget.npc && myTarget.account.isYoung )
|| ( myTarget.npc && ValidateObject( myTarget.owner ) && !myTarget.owner.npc && myTarget.owner.account.isYoung ))
Expand All @@ -80,7 +85,18 @@ function onCallback0( socket, myTarget)

if( pUser.InRange( myTarget, 8 ))
{
if( myTarget.isonhorse )
if( myTarget.isflying )
{
myTarget.isflying = false;
pUser.DoAction( 0x9 );
DoMovingEffect( pUser, myTarget, 0x26AC, 0x10, 0x00, false );
if( myTarget.socket != null )
{
myTarget.socket.SysMessage( GetDictionaryEntry( 2798, myTarget.socket.language )); // You have been grounded
}
iUsed.Delete();
}
else if( myTarget.isonhorse )
{
myTarget.Dismount();
pUser.DoAction( 0x9 );
Expand Down Expand Up @@ -117,14 +133,6 @@ function onTimer( pUser, timerID )

if( timerID == 0 )
{
var tempMsg = GetDictionaryEntry( 2720, socket.language ); // %s begins to menacingly swing a bola...
pUser.EmoteMessage( tempMsg.replace( /%s/gi, pUser.name ));
pUser.StartTimer( 1000, 1, true );
}

if( timerID == 1 )
{
pUser.SetTag( "bola", null );
socket.CustomTarget( 0 );
socket.CustomTarget(0);
}
}

0 comments on commit 370430a

Please sign in to comment.