From b7870210db4e63848caddec277415f3c0dc23d70 Mon Sep 17 00:00:00 2001
From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com>
Date: Fri, 17 Nov 2023 14:44:09 -0600
Subject: [PATCH] Update
Added Dictionary msgs to all js scripts
Fixed Snowpile to only let you target a player.
Cleaned up the addondeedgump.js with descriptions and less switch cases using a new function.
---
data/dictionaries/dictionary.CSY | 13 +++++++
data/dictionaries/dictionary.ENG | 13 +++++++
data/dictionaries/dictionary.FRE | 13 +++++++
data/dictionaries/dictionary.GER | 13 +++++++
data/dictionaries/dictionary.ITA | 13 +++++++
data/dictionaries/dictionary.POL | 13 +++++++
data/dictionaries/dictionary.PTG | 13 +++++++
data/dictionaries/dictionary.SPA | 13 +++++++
data/js/item/holidays/addondeedgump.js | 51 ++++++++++++++++++--------
data/js/item/holidays/candy.js | 6 +--
data/js/item/holidays/redeedaddon.js | 20 +++++-----
data/js/item/holidays/snowpile.js | 18 ++++-----
12 files changed, 162 insertions(+), 37 deletions(-)
diff --git a/data/dictionaries/dictionary.CSY b/data/dictionaries/dictionary.CSY
index b4a6bc2e1..80bbc74e3 100644
--- a/data/dictionaries/dictionary.CSY
+++ b/data/dictionaries/dictionary.CSY
@@ -3258,6 +3258,19 @@
5156=cikánský věštec
5157=tulák
5158=železný dělník
+// [5500-5600] Holiday Msgs
+5500=Kam chcete umístit tuto dekoraci?
+5501=Dekorace musí být umístěna vedle zdi.
+5502=Toto umístění není ve vašem domě.
+5503=Extrémní bolest zubů ustupuje.
+5504=Máte pocit, jako byste mohli jíst, kolik chcete!
+5506=Přejete si předělat tuto dekoraci?
+5507=Hlášení o chybě GM
+5508=Právě vás zasáhla sněhová koule!
+5509=Házíte sněhovou kouli a zasáhnete cíl!
+5510=Můžete házet sněhovou kouli pouze na něco, co ji může hodit zpět.
+5511=Sníh ještě není připraven k zabalení. Zkoušej to dál.
+5512=Opatrně balíte sníh do koule...
// [6000-6499] Misc Skill Msgs
6000=Tato osoba vypadá jako %s a %t.
6001=Nemůžeš z toho udělat nic užitečného.
diff --git a/data/dictionaries/dictionary.ENG b/data/dictionaries/dictionary.ENG
index 4b38d6239..e4a54eefb 100644
--- a/data/dictionaries/dictionary.ENG
+++ b/data/dictionaries/dictionary.ENG
@@ -3258,6 +3258,19 @@
5156=the Gypsy Fortune Teller
5157=the Vagabond
5158=the Iron Worker
+// [5500-5600] Holiday Msgs
+5500=Where would you like to place this decoration?
+5501=The decoration must be placed next to a wall.
+5502=That location is not in your house.
+5503=The extreme pain in your teeth subsides.
+5504=You feel as if you could eat as much as you wanted!
+5506=Do you wish to re - deed this decoration ?
+5507=Error Report to GM
+5508=You have just been hit by a snowball!
+5509=You throw the snowball and hit the target!
+5510=You can only throw a snowball at something that can throw one back.
+5511=The snow is not ready to be packed yet. Keep trying.
+5512=You carefully pack the snow into a ball...
// [6000-6499] Misc Skill Msgs
6000=That person looks %s and %t.
6001=You can't make anything useful from that.
diff --git a/data/dictionaries/dictionary.FRE b/data/dictionaries/dictionary.FRE
index 7194e3336..ce2e1173b 100644
--- a/data/dictionaries/dictionary.FRE
+++ b/data/dictionaries/dictionary.FRE
@@ -3422,6 +3422,19 @@
5156=la diseuse de bonne aventure gitane
5157=le Vagabond
5158=Le travailleur du fer
+// [5500-5600] Messages de vacances
+5500=Où souhaitez-vous placer cette décoration ?
+5501=La décoration doit être placée à côté d'un mur.
+5502=Cet emplacement n'est pas dans votre maison.
+5503=La douleur extrême dans vos dents s'atténue.
+5504=Vous avez l'impression de pouvoir manger autant que vous le souhaitez !
+5506=Voulez-vous restituer cette décoration ?
+5507=Rapport d'erreur au GM
+5508=Vous venez d'être frappé par une boule de neige !
+5509=Vous lancez la boule de neige et atteignez la cible !
+5510=Vous ne pouvez lancer une boule de neige que sur quelque chose qui peut en renvoyer une.
+5511=La neige n'est pas encore prête à être tassée. Continue d'essayer.
+5512=Vous mettez soigneusement la neige en boule...
// [6000-6499] Misc Skill Msgs
6000=Cette personne a l'air %s et %t.
6001=On ne peut pas en faire quelque chose d'utile.
diff --git a/data/dictionaries/dictionary.GER b/data/dictionaries/dictionary.GER
index 8c41ee586..69e1fea2f 100644
--- a/data/dictionaries/dictionary.GER
+++ b/data/dictionaries/dictionary.GER
@@ -3258,6 +3258,19 @@
5156=die Zigeuner-Wahrsagerin
5157=der Vagabund
5158=der Eisenarbeiter
+// [5500-5600] Feiertagsnachrichten
+5500=Wo möchten Sie diese Dekoration platzieren?
+5501=Die Dekoration muss neben einer Wand platziert werden.
+5502=Dieser Standort befindet sich nicht in Ihrem Haus.
+5503=Der extreme Schmerz in Ihren Zähnen lässt nach.
+5504=Sie haben das Gefühl, Sie könnten so viel essen, wie Sie wollten!
+5506=Möchten Sie diese Dekoration erneut übertragen?
+5507=Fehlerbericht an GM
+5508=Du wurdest gerade von einem Schneeball getroffen!
+5509=Du wirfst den Schneeball und triffst das Ziel!
+5510=Man kann einen Schneeball nur auf etwas werfen, das einen zurückwerfen kann.
+5511=Der Schnee kann noch nicht gepackt werden. Weiter versuchen.
+5512=Du packst den Schnee sorgfältig zu einer Kugel...
// [6000-6499] Misc Skill Msgs
6000=Diese Person sieht %s und %t aus.
6001=Da kann man nichts Nützliches draus machen.
diff --git a/data/dictionaries/dictionary.ITA b/data/dictionaries/dictionary.ITA
index c47a0a19c..5655f0a13 100644
--- a/data/dictionaries/dictionary.ITA
+++ b/data/dictionaries/dictionary.ITA
@@ -3258,6 +3258,19 @@
5156=il Cartomante Zingaro
5157=il Vagabondo
5158=il Lavoratore del Ferro
+// [5500-5600] Messaggi festivi
+5500=Dove vorresti posizionare questa decorazione?
+5501=La decorazione deve essere posizionata vicino ad un muro.
+5502=Quella posizione non è a casa tua.
+5503=Il forte dolore ai denti si attenua.
+5504=Ti senti come se potessi mangiare quanto vuoi!
+5506=Vuoi rifare questa decorazione?
+5507=Segnalazione errori al GM
+5508=Sei appena stato colpito da una palla di neve!
+5509=Lanci la palla di neve e colpisci il bersaglio!
+5510=Puoi lanciare una palla di neve solo contro qualcosa che può respingerla.
+5511=La neve non è ancora pronta per essere compattata. Continua a provare.
+5512=Comprimi con cura la neve fino a formare una palla...
// [6000-6499] Misc Skill Msgs
6000=Quella persona sembra %s e %t.
6001=Non puoi ricavarne nulla di utile.
diff --git a/data/dictionaries/dictionary.POL b/data/dictionaries/dictionary.POL
index dbdc431e2..c1c17fa4b 100644
--- a/data/dictionaries/dictionary.POL
+++ b/data/dictionaries/dictionary.POL
@@ -3258,6 +3258,19 @@
5156=cygański wróżbita
5157=Włóczęga
5158=Żelazny robotnik
+// [5500-5600] Wiadomości świąteczne
+5500=Gdzie chcesz umieścić tę dekorację?
+5501=Dekoracja musi być umieszczona obok ściany.
+5502=Ta lokalizacja nie znajduje się w twoim domu.
+5503=Ogromny ból zębów ustępuje.
+5504=Czujesz się tak, jakbyś mógł zjeść tyle, ile chcesz!
+5506=Czy chcesz ponownie wykonać tę dekorację?
+5507=Zgłoś błąd do GM
+5508=Właśnie uderzyła Cię śnieżka!
+5509=Rzucasz śnieżką i trafiasz w cel!
+5510=Możesz rzucać śnieżką tylko w coś, co może ją odrzucić.
+5511=Śnieg nie jest jeszcze gotowy do ułożenia. Próbuj dalej.
+5512=Ostrożnie pakujesz śnieg w kulkę...
// [6000-6499] Różne umiejętności Msgs
6000=Ta osoba wygląda na %s i %t.
6001=Nie możesz zrobić z tego nic użytecznego.
diff --git a/data/dictionaries/dictionary.PTG b/data/dictionaries/dictionary.PTG
index 81b5da2af..ce9601e8f 100644
--- a/data/dictionaries/dictionary.PTG
+++ b/data/dictionaries/dictionary.PTG
@@ -3258,6 +3258,19 @@
5156=A Cigana Adivinhadora
5157=O Vagabundo
5158=O Trabalhador de Ferro
+// [5500-5600] Mensagens de feriado
+5500=Onde você gostaria de colocar esta decoração?
+5501=A decoração deve ser colocada junto a uma parede.
+5502=Esse local não é na sua casa.
+5503=A dor extrema em seus dentes diminui.
+5504=Você sente como se pudesse comer o quanto quisesse!
+5506=Deseja refazer esta decoração?
+5507=Relatório de erros ao GM
+5508=Você acabou de ser atingido por uma bola de neve!
+5509=Você joga a bola de neve e acerta o alvo!
+5510=Você só pode jogar uma bola de neve em algo que possa atirar de volta.
+5511=A neve ainda não está pronta para ser compactada. Continue tentando.
+5512=Você cuidadosamente empacota a neve em uma bola...
// [6000-6499] Misc Skill Msgs
6000=Que a pessoa parece %s e %t.
6001=Não se pode fazer nada de útil com isso.
diff --git a/data/dictionaries/dictionary.SPA b/data/dictionaries/dictionary.SPA
index 2c82493bd..7263116c4 100644
--- a/data/dictionaries/dictionary.SPA
+++ b/data/dictionaries/dictionary.SPA
@@ -3258,6 +3258,19 @@
5156=gitano adivino
5157=Vagabundo
5158=trabajador del hierro
+// [5500-5600] Mensajes de vacaciones
+5500=¿Dónde te gustaría colocar esta decoración?
+5501=La decoración debe colocarse junto a una pared.
+5502=Ese lugar no está en tu casa.
+5503=El dolor extremo en tus dientes disminuye.
+5504=¡Sientes que puedes comer todo lo que quieras!
+5506=¿Desea reescribir esta decoración?
+5507=Informe de error al GM
+5508=¡Te acaba de golpear una bola de nieve!
+5509=¡Lanzas la bola de nieve y das en el blanco!
+5510=Sólo puedes lanzar una bola de nieve a algo que pueda devolverla.
+5511=La nieve aún no está lista para ser empacada. Sigue intentándolo.
+5512=Con cuidado, haces una bola con la nieve...
// [6000-6499] Misc Skill Msgs
6000=Esa persona parece %s y %t.
6001=No se puede hacer nada útil con eso.
diff --git a/data/js/item/holidays/addondeedgump.js b/data/js/item/holidays/addondeedgump.js
index 72f187967..36e94e3e3 100644
--- a/data/js/item/holidays/addondeedgump.js
+++ b/data/js/item/holidays/addondeedgump.js
@@ -1,3 +1,7 @@
+/*
+This file is here for you to have a gump with placing single item addons, example as the wreath you can select the direction and target the area you wish it to be placed.
+*/
+
function onUseChecked( pUser, iUsed )
{
var socket = pUser.socket;
@@ -27,13 +31,10 @@ function AddonGump( pUser, iUsed )
{
var socket = pUser.socket;
var addongump = new Gump;
- var itemID = 0;
- var itemID2 = 0;
- switch( iUsed.GetTag( "addondeed" ))
- {
- case 1: itemID = 0x232D; itemID2 = 0x232C;
- }
+ var addonID = AddonDisplayID( iUsed );
+ var itemID = addonID[0];
+ var itemID2 = addonID[1];
addongump.AddPage( 0 );
addongump.AddBackground( 0, 0, 300, 150, 0xA28 );
@@ -50,7 +51,7 @@ function AddonGump( pUser, iUsed )
function onGumpPress( socket, pButton, gumpData )
{
var pUser = socket.currentChar;
- var targMsg = "Where would you like to place this decoration?";
+ var targMsg = GetDictionaryEntry( 5500, socket.language );// Where would you like to place this decoration?
var iMulti = pUser.multi;
if( ValidateObject( iMulti ) && ( iMulti.IsOnOwnerList( pUser ) || ( GetServerSetting( "COOWNHOUSESONSAMEACCOUNT" ) && ValidateObject( iMulti.owner ) && iMulti.owner.accountNum == pUser.accountNum )))
@@ -94,13 +95,9 @@ function onCallback0( socket, myTarget )
if( iMulti.lockdowns < iMulti.maxLockdowns )
{
- var itemID = 0;
- var itemID2 = 0;
-
- switch( iUsed.GetTag( "addondeed" ))
- {
- case 1: itemID = 0x232C; itemID2 = 0x232D;
- }
+ var addonID = AddonDisplayID( iUsed );
+ var itemID = addonID[0];
+ var itemID2 = addonID[1];
var addonitem = CreateDFNItem( socket, mChar, "0x232D", 1, "ITEM", true );
addonitem.Teleport( targX, targY, targZ );
@@ -114,7 +111,7 @@ function onCallback0( socket, myTarget )
}
else
{
- socket.SysMessage( "The decoration must be placed next to a wall." );
+ socket.SysMessage( GetDictionaryEntry( 5501, socket.language ));// The decoration must be placed next to a wall.
addonitem.Delete();
}
addonitem.SetTag( "addon", 1 );
@@ -129,10 +126,32 @@ function onCallback0( socket, myTarget )
}
else
{
- socket.SysMessage( "That location is not in your house." ); // That location is not in your house.
+ socket.SysMessage( GetDictionaryEntry( 5502, socket.language )); // That location is not in your house.
}
}
+/*
+The purpose of this function to determining itemID and itemID2 values based on the result of calling GetTag("addondeed") on the iUsed object.
+If the result is 1, it sets specific values for itemID and itemID2; otherwise, they remain 0.
+The function then returns an array containing these values. To a Gump and targetting cursor.
+Example of Dedd you make and add addondeed tag to
+
+customint=addondeed 2 < long as you change this number the case below needs to match up.
+in the switch add case 2 and the two ids you want to be displayed on gump for west wall and north wall.
+*/
+function AddonDisplayID( iUsed )
+{
+ var itemID = 0;
+ var itemID2 = 0;
+ switch( iUsed.GetTag( "addondeed" ))
+ {
+ case 1: itemID = 0x232D; itemID2 = 0x232C; break;
+ default: break;
+ }
+
+ return [itemID, itemID2];
+}
+
function CheckForNearbyDoors( myTarget, itemToCheck, pSocket )
{
if( ValidateObject( itemToCheck ))
diff --git a/data/js/item/holidays/candy.js b/data/js/item/holidays/candy.js
index bf77d9943..cbe3cdae9 100644
--- a/data/js/item/holidays/candy.js
+++ b/data/js/item/holidays/candy.js
@@ -13,7 +13,7 @@ function onUseChecked(pUser, iUsed)
{
if( Acidity == 30 )
{
- socket.SysMessage( "The extreme pain in your teeth subsides." );
+ socket.SysMessage( GetDictionaryEntry(5503, socket.language ));// The extreme pain in your teeth subsides.
return;
}
else
@@ -60,7 +60,7 @@ function onUseChecked(pUser, iUsed)
else
{
iUsed.Delete();
- socket.SysMessage("You feel as if you could eat as much as you wanted!");
+ socket.SysMessage( GetDictionaryEntry(5504, socket.language ));//You feel as if you could eat as much as you wanted!
pUser.SoundEffect(randomSoundNumber, false);
}
}
@@ -89,7 +89,7 @@ function onTimer( pUser, timerID )
{
if( Acidity == 30 )
{
- socket.SysMessage( "The extreme pain in your teeth subsides." );
+ socket.SysMessage( GetDictionaryEntry( 5503, socket.language ));// The extreme pain in your teeth subsides.
pUser.StartTimer( 1000, 1, true );
return;
}
diff --git a/data/js/item/holidays/redeedaddon.js b/data/js/item/holidays/redeedaddon.js
index 03ac37ade..d39fbede0 100644
--- a/data/js/item/holidays/redeedaddon.js
+++ b/data/js/item/holidays/redeedaddon.js
@@ -12,14 +12,14 @@ function ReDeedAddon( pUser, iUsed )
var wreathaddongump = new Gump;
wreathaddongump.AddPage( 0 );
- wreathaddongump.AddBackground(0, 0, 220, 170, 0x13BE);
- wreathaddongump.AddBackground(10, 10, 200, 150, 0xBB8);
+ wreathaddongump.AddBackground( 0, 0, 220, 170, 0x13BE );
+ wreathaddongump.AddBackground( 10, 10, 200, 150, 0xBB8 );
- wreathaddongump.AddHTMLGump(20, 30, 180, 60, 0, 0, "Do you wish to re - deed this decoration ?");
- wreathaddongump.AddHTMLGump(55, 100, 160, 25, 0, 0, "CONTINUE");
- wreathaddongump.AddButton(20, 100, 0xFA5, 0xFA7, 1, 0, 1);
- wreathaddongump.AddHTMLGump(55, 125, 160, 25, 0, 0, "CANCEL");
- wreathaddongump.AddButton(20, 125, 0xFA5, 0xFA7, 1, 0, 0);
+ wreathaddongump.AddHTMLGump( 20, 30, 180, 60, 0, 0, "" + GetDictionaryEntry( 5506, socket.language ) + "" );
+ wreathaddongump.AddHTMLGump( 55, 100, 160, 25, 0, 0, "CONTINUE" );
+ wreathaddongump.AddButton( 20, 100, 0xFA5, 0xFA7, 1, 0, 1 );
+ wreathaddongump.AddHTMLGump( 55, 125, 160, 25, 0, 0, "CANCEL" );
+ wreathaddongump.AddButton( 20, 125, 0xFA5, 0xFA7, 1, 0, 0 );
wreathaddongump.Send( pUser );
wreathaddongump.Free();
@@ -30,6 +30,8 @@ function onGumpPress( pSock, pButton, gumpData )
var pUser = pSock.currentChar;
var iUsed = pSock.tempObj;
var iMulti = FindMulti(iUsed.x, iUsed.y, iUsed.z, pSock.currentChar.worldnumber);
+
+
var deedName = "";
switch( pButton )
{
@@ -41,7 +43,7 @@ function onGumpPress( pSock, pButton, gumpData )
case "0x232D":
case "wreathaddon": deedName = "WreathDeed"; break;
default:
- pSock.SysMessage( "Error Report to GM" );
+ pSock.SysMessage( GetDictionaryEntry( 5507, pSock.language ));
break;
}
break;
@@ -52,7 +54,7 @@ function onGumpPress( pSock, pButton, gumpData )
if( deedName != "" )
{
- var deeditem = CreateDFNItem(pSock, pSock.currentChar, deedName, 1, "ITEM", true );
+ var deeditem = CreateDFNItem( pSock, pSock.currentChar, deedName, 1, "ITEM", true );
if( ValidateObject( deeditem ))
{
iUsed.Delete();
diff --git a/data/js/item/holidays/snowpile.js b/data/js/item/holidays/snowpile.js
index 17d28807c..c2e92ecc9 100644
--- a/data/js/item/holidays/snowpile.js
+++ b/data/js/item/holidays/snowpile.js
@@ -11,18 +11,18 @@ function onUseChecked( pUser, iUsed )
//Check to see if it's locked down
if( iUsed.movable == 2 || iUsed.movable == 3 )
{
- socket.SysMessage(GetDictionaryEntry( 774, socket.language )); // That is locked down and you cannot use it
+ socket.SysMessage( GetDictionaryEntry( 774, socket.language )); // That is locked down and you cannot use it
return false;
}
var itemOwner = GetPackOwner( iUsed, 0 );
if( itemOwner == null || itemOwner.serial != pUser.serial )
{
- pUser.SysMessage(GetDictionaryEntry( 1763, socket.language )); // // The item must be in your backpack to use it.
+ pUser.SysMessage( GetDictionaryEntry( 1763, socket.language )); // // The item must be in your backpack to use it.
return false;
}
else if( pUser.isonhorse )
{
- pUser.SysMessage(GetDictionaryEntry(2713, socket.language)); // You cannot use this while riding a mount.
+ pUser.SysMessage( GetDictionaryEntry(2713, socket.language )); // You cannot use this while riding a mount.
return false;
}
@@ -34,13 +34,13 @@ function onUseChecked( pUser, iUsed )
//the addition of the false-flag in the EmoteMessage below tells the server to only
//send the message to this character
- pUser.SysMessage( "You carefully pack the snow into a ball..." ); //You carefully pack the snow into a ball...
+ pUser.SysMessage( GetDictionaryEntry( 5512, socket.language )); //You carefully pack the snow into a ball...
pUser.CustomTarget(0);
pUser.StartTimer( 5000, 0, true );
}
else if( pUser.GetTempTag( "snowpile" ) == 1 )
{
- pUser.SysMessage( "The snow is not ready to be packed yet. Keep trying." ); // The snow is not ready to be packed yet. Keep trying.
+ pUser.SysMessage( GetDictionaryEntry( 5511, socket.language )); // The snow is not ready to be packed yet. Keep trying.
}
else
{
@@ -59,17 +59,17 @@ function onCallback0( socket, myTarget )
pUser.visible = 0;
}
- if( !socket.GetWord(1) && myTarget.isChar )
+ if (!socket.GetWord(1) && myTarget.isChar && myTarget.socket )
{
pUser.DoAction( 0x9 );
pUser.SoundEffect( 0x145, true );
DoMovingEffect( pUser.x, pUser.y, pUser.z + 15, myTarget.x, myTarget.y, myTarget.z + 3, 0x36E4, 0x7, 0x00, true, 0x480, 0 );
- myTarget.SysMessage( "You have just been hit by a snowball!" ); // You have just been hit by a snowball!
- pUser.SysMessage( "You throw the snowball and hit the target!" ); // You throw the snowball and hit the target!
+ myTarget.SysMessage( GetDictionaryEntry(5508, socket.language )); // You have just been hit by a snowball!
+ pUser.SysMessage( GetDictionaryEntry (5509, socket.language )); // You throw the snowball and hit the target!
}
else
{
- socket.SysMessage( "You can only throw a snowball at something that can throw one back." ); // You can only throw a snowball at something that can throw one back.
+ socket.SysMessage( GetDictionaryEntry( 5510, socket.language )); // You can only throw a snowball at something that can throw one back.
}
}