* Added documentation for cashshop.c functions. (credits: Lighta)

* Fixed a duplicate 'next' call for cart function in functions_kafras.txt.
* Updated item bonuses for LV5 Assumptio Scroll (12218) and Chemical Protection scrolls. (Hercules 7a625b9, 854851c; incl. bugreport:6396)
* Replaced current SPN map_msg translation by jaBote/Tragedy with one by Leeg.
* Updated FRN, CHN map_msg translations. (credits: Capuche, Goddameit)
* Changed '@newmount' to '@mount2' in atcommand documentation.
* Other misc. changes.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17305 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
euphyy 2013-04-29 22:39:28 +00:00
parent 49cb99c7de
commit 0cb9ee98ef
14 changed files with 1170 additions and 1116 deletions

View File

@ -286,8 +286,8 @@
269: Displaying first %d out of %d matches
//@me output format
270: * :%s %s: *
271: You can't drop items on this map
272: You can't trade on this map
271: You can't drop items on this map.
272: You can't trade on this map.
273: Commands available:
274: %d commands found.
275: No commands found.
@ -296,7 +296,7 @@
278: (@request): %s
279: @request sent.
280: Invalid name.
281: You can't create chat rooms on this map
281: You can't create chat rooms on this map.
//Party-related
282: You need to be a party leader to use this command.
283: Target character must be online and in your current party.

View File

@ -1451,6 +1451,47 @@
1433: 你的聊天室被 '#%s' 頻道解除綁定
1434: 你已經在 '%s' 頻道裡面
1435: 你現在在 '#%s' 頻道裡面('%s')
1436: 頻道密碼字數不可多於 %d
1437: 玩家 '%s' 被 '%s' 禁止進入
1438: 你被 '%s' 頻道禁止
1439: 頻道 '%s' 裡沒有被禁止的玩家
1440: 玩家 '%s' 沒有被這頻道禁止
1441: 玩家 '%s' 被 '%s' 頻道解除禁止
1442: 清除所有被 '%s' 頻道禁止的玩家
1443: ---- '#%s' 禁止名單:
1444: ---- 允許的顏色 ----
1445: - %s
1446: 你需要輸入選項
1447: 未知選項 '%s'.
1448: 頻道 '%s' 已被刪除
1449: 選項 '%s' 已經被啟用 (使用 '@channel setopt %s 0' 來取消).
1450: 選項 '%s' 已被 '%s' 頻道啟用
1451: 數值 '%d' 超過 '%s' 選項的範圍 (範圍 0-10).
1452: 選項 '%s' 已被頻道啟用 '%s' 在 %d 秒內
1453: 選項 '%s' 已被頻道 '%s' 取消
//1454 free
1455: 你訊息發布太密集!
1456: * %s ban <#channel_name> <player>
1457: -- 禁止該頻道內特定的玩家
1458: * %s banlist <#channel_name>
1459: -- 顯示被該頻道禁止所有的玩家
1460: * %s unban <#channel_name> <player>
1461: -- 解除該頻道內的特定玩家
1462: * %s setopt <#channel_name> <option> <value>
1463: -- 設定選項和數值在特定頻道上
1464: 禁止玩家 '%s' 失敗
1465: 玩家 '%s' 已被本頻道禁止了
1466: 輸入秒數 (0-10) 給 '%s' 選項
1467: * %s unbanall <#channel_name>
1468: -- 清除特定頻道內所有禁止名單
1469: * %s delete <#channel_name>
1470: -- 消除特定頻道
1471: * %s list mine
1472: -- 顯示所有你加入的頻道
1473: * %s join <#channel_name> <channel_password>
1474: -- 加入特定頻道
1475: ---- 我的頻道 ----
1476: 你沒有加入任何的頻道
//Custom translations
//import: conf/msg_conf/import/map_msg_chn_conf.txt

View File

@ -1412,8 +1412,8 @@
1398: -- Affichage des premiers %d de la recherche:
// @channel
1399: Canal ('Channel') inconnu (usage: %s <#nom_canal>).
1400: Canal ('Channel') inconnu '%s' (usage: %s <#nom_canal>).
1399: Canal inconnu (usage: %s <#nom_canal>).
1400: Canal '%s' inconnu (usage: %s <#nom_canal>).
1401: Le Canal '%s' est protégé par un mot de passe (usage: %s <#nom_canal> <mot_de_passe>).
1402: Vous n'êtes pas sur ce canal, taper '@join <#nom_canal>'.
1403: Vous êtes connecté(e) sur le Canal '%s'.
@ -1451,43 +1451,43 @@
1435: Vous êtes sur le Canal '#%s' à '%s'.
1436: Le Mot de passe du Canal ne peut pas dépasser %d caractères.
1437: Le Joueur '%s' est banni du canal '%s'.
1438: Vous ne pouvez pas rejoindre le canal '%s', vous en êtes banni.
1439: Le canal '%s' n'a aucun joueur banni.
1438: Vous êtes banni(e) du canal '%s'.
1439: Le canal '%s' ne contient aucun joueur banni.
1440: Le joueur '%s' n'est pas banni de ce canal.
1441: Le joueur '%s' n'est plus banni du canal '%s'
1442: Liste des bannis du canal '%s' supprimée.
1443: ---- liste des bannis de '#%s':
1443: ---- Liste des bannis de '#%s':
1444: ---- Couleurs disponibles ----
1445: - %s
1446: Veuillez entrer une option.
1447: Option de canal '%s' inconnue.
1448: Canal %s supprimé,
1449: L'option '%s' est déjà activée, si vous souhaitez la désactiver entrez: '@channel setopt %s 0'.
1450: Option '%s' maintenant activée sur le canal '%s'.
1448: Canal %s supprimé.
1449: L'option '%s' est déjà activée, entrez '@channel setopt %s 0' pour la désactiver.
1450: Option '%s' activée sur le canal '%s'.
1451: La valeur '%d' pour l'option '%s' est incorrecte (doit être comprise entre 0-10).
1452: Option '%s' maintenant activée sur le canal '%s' avec %d secondes.
1453: Option '%s' maintenant désactivée sur le canal '%s'.
1452: Option '%s' activée sur le canal '%s' avec %d secondes.
1453: Option '%s' désactivée sur le canal '%s'.
//1454 free
1455: Vous parlez trop rapidement!
1456: * %s ban <#nom_canal> <nom du personnage>
1457: -- Banni <nom du personnage> du canal <#nom_canal>
1457: -- Banni le joueur spécifié du canal.
1458: * %s banlist <#nom_canal>
1459: -- Listes de tous les personnages bannis du canal <#nom_canal>
1459: -- Listes tous les joueurs bannis du canal spécifié.
1460: * %s unban <#nom_canal> <nom du personnage>
1461: -- Débanni <nom du personnage> du canal <#nom_canal>
1461: -- Débanni le joueur spécifié du canal.
1462: * %s setopt <#nom_canal> <nom de l'option> <valeur de l'option>
1463: -- Ajoute ou supprime <nom option> avec <valeur de l'option> du canal <#nom_canal>
1464: Ban échoué, impossible de bannir/débannir cet utilisateur.
1463: -- Change l'option et la valeur pour le canal spécifié.
1464: Bannissement du joueur '%s' échoué.
1465: Le joueur '%s' est déjà banni de ce canal.
1466: Pour '%s' vous avez besoin de la quantité de secondes (0 à 10 secs)
1466: Entrez un temps en secondes (1-10) pour l'option '%s'.
1467: * %s unbanall <#nom_canal>
1468: -- Débanni tous les bannis du canal <#nom_canal>
1468: -- Débanni tous les joueurs bannis du canal spécifié.
1469: * %s delete <#nom_canal>
1470: -- Force les utilisateurs à sortir du canal et supprime le canal spécifié
1470: -- Supprime le canal spécifié.
1471: * %s list mine
1472: -- Liste tous les canaux rejoins
1472: -- Liste tous les canaux que vous avez rejoins.
1473: * %s join <#nom_canal> <mot de passe du canal>
1474: -- joindre le canal spécifié
1474: -- Joindre le canal spécifié.
1475: ---- Canaux rejoins ----
1476: Vous n'avez rejoins aucun canal.

File diff suppressed because it is too large Load Diff

View File

@ -4763,7 +4763,7 @@
12215,Blessing_10_Scroll,LV10 Blessing Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10; },{},{}
12216,Inc_Agi_10_Scroll,LV10 Agil Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Hp>15) { skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,240000,10; heal -15,0; } },{},{}
12217,Aspersio_5_Scroll,LV5 Aspersio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(countitem(523)>0) { skilleffect "PR_ASPERSIO",0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; } },{},{}
12218,Assumptio_5_Scroll,LV5 Assumptio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "HP_ASSUMPTIO",0; sc_start SC_ASSUMPTIO,100000,5; },{},{}
12218,Assumptio_5_Scroll,LV5 Assumptio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ASSUMPTIO,100000,5; skilleffect "HP_ASSUMPTIO",0; },{},{}
12219,Wind_Walk_10_Scroll,LV10 Wind Walker Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "SN_WINDWALK",0; sc_start SC_WINDWALK,250000,5; },{},{}
12220,Adrenaline_Scroll,LV5 Adrenaline Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set .@type,getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect "BS_ADRENALINE",0; sc_start SC_ADRENALINE,150000,5; } },{},{}
12221,Megaphone_,Megaphone,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ input @megaphone$; announce strcharinfo(0) + ": " + @megaphone$,bc_all,0xFF0000; end; },{},{}
@ -6327,11 +6327,11 @@
14514,Vermilion_10_Scroll,Lord of Vermilion Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_VERMILION",10; },{},{}
14515,Lex_Aeterna_Scroll,Lex Aeterna Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "PR_LEXAETERNA",1; },{},{}
14516,Magnificat_5_Scroll,Magnificat Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "PR_MAGNIFICAT",5; },{},{}
14517,CP_Helm_Scroll,Chemical Protection Helm Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPHELM; skilleffect "AM_CP_HELM",0; sc_start SC_CP_HELM,600000,5; },{},{}
14518,CP_Shield_Scroll,Chemical Protection Shield Scrol,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPSHIELD; skilleffect "AM_CP_SHIELD",0; sc_start SC_CP_SHIELD,600000,5; },{},{}
14519,CP_Armor_Scroll,Chemical Protection Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPARMOR; skilleffect "AM_CP_ARMOR",0; sc_start SC_CP_ARMOR,600000,5; },{},{}
14520,CP_Weapon_Scroll,Chemical Protection Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPWEAPON; skilleffect "AM_CP_WEAPON",0; sc_start SC_CP_WEAPON,600000,5; },{},{}
14521,Repair_Scroll,Repair Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),108,1; },{},{}
14517,CP_Helm_Scroll,Chemical Protection Helm Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_HELM",5; },{},{}
14518,CP_Shield_Scroll,Chemical Protection Shield Scrol,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_SHIELD",5; },{},{}
14519,CP_Armor_Scroll,Chemical Protection Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_ARMOR",5; },{},{}
14520,CP_Weapon_Scroll,Chemical Protection Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_WEAPON",5; },{},{}
14521,Repair_Scroll,Repair Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"BS_REPAIRWEAPON",1; },{},{}
14522,Big_Bun,Big Bun,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,0; },{},{}
14523,Pill_,Pill,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,100; },{},{}
14524,Superb_Fish_Slice,Superb Fish Slice,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,100; },{},{}

View File

@ -5351,7 +5351,7 @@
12215,Blessing_10_Scroll,LV10 Blessing Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10; },{},{}
12216,Inc_Agi_10_Scroll,LV10 Agil Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Hp>15) { skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,240000,10; heal -15,0; } },{},{}
12217,Aspersio_5_Scroll,LV5 Aspersio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(countitem(523)>0) { skilleffect "PR_ASPERSIO",0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; } },{},{}
12218,Assumptio_5_Scroll,LV5 Assumptio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "HP_ASSUMPTIO",0; sc_start SC_ASSUMPTIO,100000,5; },{},{}
12218,Assumptio_5_Scroll,LV5 Assumptio Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ASSUMPTIO,100000,5; skilleffect "HP_ASSUMPTIO",0; },{},{}
12219,Wind_Walk_10_Scroll,LV10 Wind Walker Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ skilleffect "SN_WINDWALK",0; sc_start SC_WINDWALK,250000,5; },{},{}
12220,Adrenaline_Scroll,LV5 Adrenaline Scroll,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set .@type,getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect "BS_ADRENALINE",0; sc_start SC_ADRENALINE,150000,5; } },{},{}
12221,Megaphone_,Megaphone,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ input @megaphone$; announce strcharinfo(0) + ": " + @megaphone$,bc_all,0xFF0000; end; },{},{}
@ -7046,11 +7046,11 @@
14514,Vermilion_10_Scroll,Lord of Vermilion Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "WZ_VERMILION",10; },{},{}
14515,Lex_Aeterna_Scroll,Lex Aeterna Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "PR_LEXAETERNA",1; },{},{}
14516,Magnificat_5_Scroll,Magnificat Scroll,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "PR_MAGNIFICAT",5; },{},{}
14517,CP_Helm_Scroll,Chemical Protection Helm Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPHELM; skilleffect "AM_CP_HELM",0; sc_start SC_CP_HELM,600000,5; },{},{}
14518,CP_Shield_Scroll,Chemical Protection Shield Scrol,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPSHIELD; skilleffect "AM_CP_SHIELD",0; sc_start SC_CP_SHIELD,600000,5; },{},{}
14519,CP_Armor_Scroll,Chemical Protection Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPARMOR; skilleffect "AM_CP_ARMOR",0; sc_start SC_CP_ARMOR,600000,5; },{},{}
14520,CP_Weapon_Scroll,Chemical Protection Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_end SC_STRIPWEAPON; skilleffect "AM_CP_WEAPON",0; sc_start SC_CP_WEAPON,600000,5; },{},{}
14521,Repair_Scroll,Repair Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),108,1; },{},{}
14517,CP_Helm_Scroll,Chemical Protection Helm Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_HELM",5; },{},{}
14518,CP_Shield_Scroll,Chemical Protection Shield Scrol,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_SHIELD",5; },{},{}
14519,CP_Armor_Scroll,Chemical Protection Armor Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_ARMOR",5; },{},{}
14520,CP_Weapon_Scroll,Chemical Protection Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"AM_CP_WEAPON",5; },{},{}
14521,Repair_Scroll,Repair Weapon Scroll,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ unitskilluseid getcharid(3),"BS_REPAIRWEAPON",1; },{},{}
14522,Big_Bun,Big Bun,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,0; },{},{}
14523,Pill_,Pill,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,100; },{},{}
14524,Superb_Fish_Slice,Superb Fish Slice,0,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 100,100; },{},{}

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 20130426
//= 20130429
//===== Description: =========================================
//= List of available atcommands and their functions.
//============================================================
@ -851,9 +851,9 @@ Summons the specified amount of spirit spheres around you.
---------------------------------------
@mount
@newmount
@mount2
Toggles mounting/unmounting a peco (@mount) or cash mount (@newmount).
Toggles mounting/unmounting a peco (@mount) or cash mount (@mount2).
---------------------------------------

View File

@ -3458,8 +3458,8 @@ bird and 0 if they aren't.
The 'setdragon' function toggles mounting a dragon for the invoking character.
It will return 1 if successful, 0 otherwise.
If the character can mount a dragon, the <color> options are:
1 - Green Dragon (default when omitted)
The available colors are:
1 - Green Dragon (default)
2 - Brown Dragon
3 - Gray Dragon
4 - Blue Dragon

View File

@ -179,8 +179,7 @@ function script F_Kafra {
mes "understanding and cooperation.";
}
} else if (@K_Menu0$[.@j] == "Rent a Pushcart") {
if(callfunc("F_KafCart",getarg(0),getarg(4)) == 1)
next;
callfunc "F_KafCart",getarg(0),getarg(4);
} else if (@K_Menu0$[.@j] == "Check Other Information") {
callfunc "F_KafInfo",getarg(2);
} else if (@K_Menu0$[.@j] == "Cancel"){
@ -339,7 +338,7 @@ function script F_KafCart {
mes "is only available to Merchants,";
mes "Blacksmiths, Master Smiths,";
mes "Alchemists and Biochemists.";
return 1;
return;
}
// Make sure the invoking character does not have a cart already
else if(checkcart() == 1){
@ -349,7 +348,7 @@ function script F_KafCart {
mes "Unfortunately, we can't";
mes "rent more than one to";
mes "each customer at a time.";
return 1;
return;
}
// Consume "Free Ticket for the Cart Service" if available.
// Do not consume if in Guild castle.
@ -360,20 +359,20 @@ function script F_KafCart {
mes "fee is "+getarg(1)+" zeny. Would";
mes "you like to rent a Pushcart?";
next;
if (select("Rent a Pushcart.:Cancel") == 2) return 0;
if (select("Rent a Pushcart.:Cancel") == 2) return;
if(Zeny<getarg(1)){
mes "[Kafra Employee]";
mes "I'm sorry, but you";
mes "don't have enough";
mes "zeny to pay the Pushcart";
mes "rental fee of "+getarg(1)+" zeny.";
return 1;
return;
}
set Zeny,Zeny-getarg(1);
set RESRVPTS, RESRVPTS + 48;
}
setcart;
return 1;
return;
}
//===================================================

View File

@ -1,5 +1,5 @@
//===== rAthena Script =======================================
//= Brasilis Qiests
//= Brasilis Quests
//===== By ===================================================
//= L0ne_W0lf
//===== Version ==============================================
@ -21,7 +21,7 @@
//= 1.2a Added 'consumeitem' command. [Euphy]
//============================================================
// Lost Puppies, Original file: dogdog.sc
// Lost Puppies :: dogdog.sc
//============================================================
brasilis,297,307,5 script Angelo#br 50,{
if (BaseLevel < 40) {
@ -143,7 +143,7 @@ bra_fild01,234,101,3 duplicate(Puppy#bra) Puppy#d1 81
bra_fild01,200,84,3 duplicate(Puppy#bra) Puppy#d2 81
bra_fild01,176,63,5 duplicate(Puppy#bra) Puppy#d3 81
// Suspicious Beach, original file: Suspicious_Beach.sc
// Suspicious Beach :: Suspicious_Beach.sc
//============================================================
brasilis,192,133,6 script Lucia#brasilis 478,{
/* -------------- Hydra Ball -------------------------
@ -169,7 +169,7 @@ brasilis,192,133,6 script Lucia#brasilis 478,{
else {
set .@nQState1,checkquest(9028);
set .@nQState2,checkquest(9029);
if (.@nQState1 == 0) {
if (.@nQState1 == -1) {
mes "[Lucia]";
mes "Hello.";
mes "Have you come here to hunt ^FF0000Strange Hydra^000000s?";
@ -355,7 +355,7 @@ OnTimer7000:
end;
}
// Guarana Quest, Original file: brazil_tre.sc
// Guarana Quest :: brazil_tre.sc
//============================================================
brasilis,187,162,5 script Candy Maker 476,{
if (!checkweight(1201,1)) {
@ -1033,7 +1033,7 @@ bra_fild01,245,52,3 script Monkey#bra 111,{
}
}
// Water Lily Quest, Original file: brazil_tre.sc
// Water Lily Quest :: brazil_tre.sc
//============================================================
brasilis,203,286,3 script Botanist Karmen#bra 893,{
if (brazil_regia == 0) {
@ -1930,7 +1930,7 @@ bra_dun02,71,200,3 script Water lily#bra 111,{
}
}
// Dungeon Access Quest, Original file: brazil_tre.sc
// Dungeon Access Quest :: brazil_tre.sc
//============================================================
brasilis,185,246,5 script Pedro#bra 62,{
if (brazil_ghost == 0) {
@ -2840,7 +2840,7 @@ OnInit:
end;
}
// Iara, Original file: iara.sc
// Iara :: iara.sc
//============================================================
brasilis,315,334,5 script Shaman#nk 474,{
set .@iara_re,checkquest(4135,PLAYTIME);
@ -2963,22 +2963,19 @@ brasilis,315,334,5 script Shaman#nk 474,{
mes "Could you listen to my stories for a moment.";
mes "There's an emergency in our tribe.";
next;
switch(select("No.:Okay.")) {
case 1:
if(select("No.:Okay.") == 1) {
mes "[Anori]";
mes "You are a heartless person...";
mes "You don't seem the helpful type.";
mes "Just keep on going your way.";
close;
case 2:
mes "[Anori]";
mes "Thank you, I met a kind person.";
mes "It's a secret of our tribe that";
mes "you cannot tell anyone.";
next;
break;
}
mes "[Anori]";
mes "Thank you, I met a kind person.";
mes "It's a secret of our tribe that";
mes "you cannot tell anyone.";
next;
mes "[Anori]";
mes "Lately young men from";
mes "the tribe are disappearing.";
mes "Our entire tribe is being threatened.";
@ -3099,11 +3096,10 @@ bra_dun02,157,74,5 script Iara#nk 478,2,2,{
mes "Aaaaaaaaaaaaaaaaaaaaaah.";
mes "Eeeeeeeeeeeeeeeeeeeh.";
mes "Oooooooooooooooooh.";
set .@get_de,rand(1,2);
if (.@get_de == 1)
sc_start Sc_Curse,60000,0;
if (rand(1,2) == 1)
sc_start SC_CURSE,60000,0;
else
sc_start Sc_Confusion,60000,0;
sc_start SC_CONFUSION,60000,0;
next;
mes "[" + strcharinfo(0) + "]";
mes "Ugh! What's this strange voice?";
@ -3117,11 +3113,10 @@ OnTouch:
mes "Aaaaaaaaaaaaaaaaaaaaaah.";
mes "Eeeeeeeeeeeeeeeeeeeh.";
mes "Oooooooooooooooooh.";
set .@get_de,rand(1,2);
if (.@get_de == 1)
sc_start Sc_Curse,60000,0;
if (rand(1,2) == 1)
sc_start SC_CURSE,60000,0;
else
sc_start Sc_Confusion,60000,0;
sc_start SC_CONFUSION,60000,0;
next;
mes "[" + strcharinfo(0) + "]";
mes "Ugh! What's this strange voice?";
@ -3132,7 +3127,7 @@ OnTouch:
bra_fild01,188,301,5 script Native Warrior#nk 472,{
mes "[Native Warrior]";
mes "Ah...the face I would never forget even in my dreams.";
mes "Ah... the face I would never forget even in my dreams.";
next;
mes "[Native Warrior]";
mes "When will she come out of the waterfall again...?";
@ -3144,7 +3139,7 @@ bra_fild01,188,301,5 script Native Warrior#nk 472,{
else {
mes "[" + strcharinfo(0) + "]";
mes "(This guy will never";
mes "get ocer Iara's curse...)";
mes "get over Iara's curse...)";
}
close;
}

View File

@ -4794,7 +4794,7 @@ REPLACE INTO `item_db` VALUES (12214,'Convex_Mirror','Convex Mirror',2,2,NULL,10
REPLACE INTO `item_db` VALUES (12215,'Blessing_10_Scroll','LV10 Blessing Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10;',NULL,NULL);
REPLACE INTO `item_db` VALUES (12216,'Inc_Agi_10_Scroll','LV10 Agil Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(Hp>15) { skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,240000,10; heal -15,0; }',NULL,NULL);
REPLACE INTO `item_db` VALUES (12217,'Aspersio_5_Scroll','LV5 Aspersio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(countitem(523)>0) { skilleffect "PR_ASPERSIO",0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; }',NULL,NULL);
REPLACE INTO `item_db` VALUES (12218,'Assumptio_5_Scroll','LV5 Assumptio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "HP_ASSUMPTIO",0; sc_start SC_ASSUMPTIO,100000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (12218,'Assumptio_5_Scroll','LV5 Assumptio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASSUMPTIO,100000,5; skilleffect "HP_ASSUMPTIO",0;',NULL,NULL);
REPLACE INTO `item_db` VALUES (12219,'Wind_Walk_10_Scroll','LV10 Wind Walker Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "SN_WINDWALK",0; sc_start SC_WINDWALK,250000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (12220,'Adrenaline_Scroll','LV5 Adrenaline Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set .@type,getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect "BS_ADRENALINE",0; sc_start SC_ADRENALINE,150000,5; }',NULL,NULL);
REPLACE INTO `item_db` VALUES (12221,'Megaphone_','Megaphone',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'input @megaphone$; announce strcharinfo(0) + ": " + @megaphone$,bc_all,0xFF0000; end;',NULL,NULL);
@ -6358,11 +6358,11 @@ REPLACE INTO `item_db` VALUES (14513,'Storm_10_Scroll','Storm Gust Scroll',11,NU
REPLACE INTO `item_db` VALUES (14514,'Vermilion_10_Scroll','Lord of Vermilion Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "WZ_VERMILION",10;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14515,'Lex_Aeterna_Scroll','Lex Aeterna Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "PR_LEXAETERNA",1;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14516,'Magnificat_5_Scroll','Magnificat Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "PR_MAGNIFICAT",5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14517,'CP_Helm_Scroll','Chemical Protection Helm Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPHELM; skilleffect "AM_CP_HELM",0; sc_start SC_CP_HELM,600000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14518,'CP_Shield_Scroll','Chemical Protection Shield Scrol',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPSHIELD; skilleffect "AM_CP_SHIELD",0; sc_start SC_CP_SHIELD,600000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14519,'CP_Armor_Scroll','Chemical Protection Armor Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPARMOR; skilleffect "AM_CP_ARMOR",0; sc_start SC_CP_ARMOR,600000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14520,'CP_Weapon_Scroll','Chemical Protection Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPWEAPON; skilleffect "AM_CP_WEAPON",0; sc_start SC_CP_WEAPON,600000,5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14521,'Repair_Scroll','Repair Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),108,1;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14517,'CP_Helm_Scroll','Chemical Protection Helm Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_HELM",5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14518,'CP_Shield_Scroll','Chemical Protection Shield Scrol',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_SHIELD",5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14519,'CP_Armor_Scroll','Chemical Protection Armor Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_ARMOR",5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14520,'CP_Weapon_Scroll','Chemical Protection Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_WEAPON",5;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14521,'Repair_Scroll','Repair Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"BS_REPAIRWEAPON",1;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14522,'Big_Bun','Big Bun',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 100,0;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14523,'Pill_','Pill',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,100;',NULL,NULL);
REPLACE INTO `item_db` VALUES (14524,'Superb_Fish_Slice','Superb Fish Slice',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 100,100;',NULL,NULL);

View File

@ -5382,7 +5382,7 @@ REPLACE INTO `item_db_re` VALUES (12214,'Convex_Mirror','Convex Mirror',2,2,NULL
REPLACE INTO `item_db_re` VALUES (12215,'Blessing_10_Scroll','LV10 Blessing Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12216,'Inc_Agi_10_Scroll','LV10 Agil Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(Hp>15) { skilleffect "AL_INCAGI",0; sc_start SC_INCREASEAGI,240000,10; heal -15,0; }',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12217,'Aspersio_5_Scroll','LV5 Aspersio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(countitem(523)>0) { skilleffect "PR_ASPERSIO",0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; }',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12218,'Assumptio_5_Scroll','LV5 Assumptio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "HP_ASSUMPTIO",0; sc_start SC_ASSUMPTIO,100000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12218,'Assumptio_5_Scroll','LV5 Assumptio Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ASSUMPTIO,100000,5; skilleffect "HP_ASSUMPTIO",0;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12219,'Wind_Walk_10_Scroll','LV10 Wind Walker Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'skilleffect "SN_WINDWALK",0; sc_start SC_WINDWALK,250000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12220,'Adrenaline_Scroll','LV5 Adrenaline Scroll',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set .@type,getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect "BS_ADRENALINE",0; sc_start SC_ADRENALINE,150000,5; }',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (12221,'Megaphone_','Megaphone',2,2,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'input @megaphone$; announce strcharinfo(0) + ": " + @megaphone$,bc_all,0xFF0000; end;',NULL,NULL);
@ -7078,11 +7078,11 @@ REPLACE INTO `item_db_re` VALUES (14513,'Storm_10_Scroll','Storm Gust Scroll',11
REPLACE INTO `item_db_re` VALUES (14514,'Vermilion_10_Scroll','Lord of Vermilion Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "WZ_VERMILION",10;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14515,'Lex_Aeterna_Scroll','Lex Aeterna Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "PR_LEXAETERNA",1;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14516,'Magnificat_5_Scroll','Magnificat Scroll',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "PR_MAGNIFICAT",5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14517,'CP_Helm_Scroll','Chemical Protection Helm Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPHELM; skilleffect "AM_CP_HELM",0; sc_start SC_CP_HELM,600000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14518,'CP_Shield_Scroll','Chemical Protection Shield Scrol',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPSHIELD; skilleffect "AM_CP_SHIELD",0; sc_start SC_CP_SHIELD,600000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14519,'CP_Armor_Scroll','Chemical Protection Armor Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPARMOR; skilleffect "AM_CP_ARMOR",0; sc_start SC_CP_ARMOR,600000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14520,'CP_Weapon_Scroll','Chemical Protection Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_end SC_STRIPWEAPON; skilleffect "AM_CP_WEAPON",0; sc_start SC_CP_WEAPON,600000,5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14521,'Repair_Scroll','Repair Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),108,1;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14517,'CP_Helm_Scroll','Chemical Protection Helm Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_HELM",5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14518,'CP_Shield_Scroll','Chemical Protection Shield Scrol',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_SHIELD",5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14519,'CP_Armor_Scroll','Chemical Protection Armor Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_ARMOR",5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14520,'CP_Weapon_Scroll','Chemical Protection Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"AM_CP_WEAPON",5;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14521,'Repair_Scroll','Repair Weapon Scroll',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'unitskilluseid getcharid(3),"BS_REPAIRWEAPON",1;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14522,'Big_Bun','Big Bun',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 100,0;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14523,'Pill_','Pill',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,100;',NULL,NULL);
REPLACE INTO `item_db_re` VALUES (14524,'Superb_Fish_Slice','Superb Fish Slice',0,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 100,100;',NULL,NULL);

View File

@ -1938,7 +1938,7 @@ int mmo_char_send006b(int fd, struct char_session_data* sd)
}
//----------------------------------------
// [Ind/Hercules] notify client about charselect window data
// Notify client about charselect window data [Ind]
//----------------------------------------
void mmo_char_send082d(int fd, struct char_session_data* sd) {
if (save_log)

View File

@ -15,13 +15,59 @@
#include <string.h> // memset
#include <stdlib.h> // atoi
static int cashshop_parse_dbrow( char** str, const char* source, int line );
struct cash_item_db cash_shop_items[CASHSHOP_TAB_SEARCH];
extern char item_cash_db_db[32];
extern char item_cash_db2_db[32];
/*
* Reads one line from database and assigns it to RAM.
* return
* 0 = failure
* 1 = success
*/
static int cashshop_parse_dbrow( char** str, const char* source, int line ){
uint32 nameid = atoi( str[1] );
if( itemdb_exists( nameid ) ){
uint16 tab = atoi( str[0] );
uint32 price = atoi( str[2] );
struct cash_item_data* cid;
int j;
if( tab > CASHSHOP_TAB_SEARCH ){
ShowWarning( "cashshop_parse_dbrow: Invalid tab %d in line %d of \"%s\", skipping...\n", tab, line, source );
return 0;
}else if( price < 1 ){
ShowWarning( "cashshop_parse_dbrow: Invalid price %d in line %d of \"%s\", skipping...\n", price, line, source );
return 0;
}
ARR_FIND( 0, cash_shop_items[tab].count, j, nameid == cash_shop_items[tab].item[j]->nameid );
if( j == cash_shop_items[tab].count ){
RECREATE( cash_shop_items[tab].item, struct cash_item_data *, ++cash_shop_items[tab].count );
CREATE( cash_shop_items[tab].item[ cash_shop_items[tab].count - 1], struct cash_item_data, 1 );
cid = cash_shop_items[tab].item[ cash_shop_items[tab].count - 1];
}else{
cid = cash_shop_items[tab].item[j];
}
cid->nameid = nameid;
cid->price = price;
return 1;
}else{
ShowWarning( "cashshop_parse_dbrow: Invalid ID %d in line %d of \"%s\", skipping...\n", nameid, line, source );
}
return 0;
}
/*
* Reads database from TXT format,
* parses lines and sends them to parse_dbrow.
*/
static void cashshop_read_db_txt( void ){
const char* filename[] = { DBPATH"item_cash_db.txt", "item_cash_db2.txt" };
int fi;
@ -88,6 +134,10 @@ static void cashshop_read_db_txt( void ){
}
}
/*
* Reads database from SQL format,
* parses line and sends them to parse_dbrow.
*/
static int cashshop_read_db_sql( void ){
const char* cash_db_name[] = { item_cash_db_db, item_cash_db2_db };
int fi;
@ -128,6 +178,10 @@ static int cashshop_read_db_sql( void ){
return 0;
}
/*
* Determines whether to read TXT or SQL database
* based on 'db_use_sqldbs' in conf/map_athena.conf.
*/
static void cashshop_read_db( void ){
if( db_use_sqldbs ){
cashshop_read_db_sql();
@ -136,44 +190,12 @@ static void cashshop_read_db( void ){
}
}
static int cashshop_parse_dbrow( char** str, const char* source, int line ){
uint32 nameid = atoi( str[1] );
if( itemdb_exists( nameid ) ){
uint16 tab = atoi( str[0] );
uint32 price = atoi( str[2] );
struct cash_item_data* cid;
int j;
if( tab > CASHSHOP_TAB_SEARCH ){
ShowWarning( "cashshop_parse_dbrow: Invalid tab %d in line %d of \"%s\", skipping.\n", tab, line, source );
return 0;
}else if( price < 1 ){
ShowWarning( "cashshop_parse_dbrow: Invalid price %d in line %d of \"%s\", skipping.\n", price, line, source );
return 0;
}
ARR_FIND( 0, cash_shop_items[tab].count, j, nameid == cash_shop_items[tab].item[j]->nameid );
if( j == cash_shop_items[tab].count ){
RECREATE( cash_shop_items[tab].item, struct cash_item_data *, ++cash_shop_items[tab].count );
CREATE( cash_shop_items[tab].item[ cash_shop_items[tab].count - 1], struct cash_item_data, 1 );
cid = cash_shop_items[tab].item[ cash_shop_items[tab].count - 1];
}else{
cid = cash_shop_items[tab].item[j];
}
cid->nameid = nameid;
cid->price = price;
return 1;
}else{
ShowWarning( "cashshop_parse_dbrow: Invalid id %d in line %d of \"%s\", skipping.\n", nameid, line, source );
}
return 0;
}
/*
* Attempts to purchase a cashshop item from the list.
* Checks if the transaction is valid and if the user has enough inventory space to receive the item.
* If yes, take cashpoints and give items;
* else return clif_error.
*/
void cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, uint16* item_list ){
uint32 totalcash = 0;
uint32 totalweight = 0;
@ -227,10 +249,7 @@ void cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, u
totalweight += itemdb_weight( nameid ) * quantity;
}
if( ( totalcash - kafrapoints ) > sd->cashPoints || kafrapoints > sd->kafraPoints ){
clif_cashshop_result( sd, 0, CASHSHOP_RESULT_ERROR_SHORTTAGE_CASH );
return;
}else if( ( totalweight + sd->weight ) > sd->max_weight ){
if( ( totalweight + sd->weight ) > sd->max_weight ){
clif_cashshop_result( sd, 0, CASHSHOP_RESULT_ERROR_INVENTORY_WEIGHT );
return;
}else if( pc_inventoryblank( sd ) < new_ ){
@ -238,7 +257,10 @@ void cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, u
return;
}
pc_paycash( sd, totalcash, kafrapoints, LOG_TYPE_CASH );
if(pc_paycash( sd, totalcash, kafrapoints, LOG_TYPE_CASH ) < 0){
clif_cashshop_result( sd, 0, CASHSHOP_RESULT_ERROR_SHORTTAGE_CASH );
return;
}
for( i = 0; i < n; ++i ){
uint32 nameid = *( item_list + i * 5 );
@ -273,11 +295,18 @@ void cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, u
clif_cashshop_result( sd, 0, CASHSHOP_RESULT_SUCCESS );
}
/*
* Reloads cashshop database by destroying it and reading it again.
*/
void cashshop_reloaddb( void ){
do_final_cashshop();
do_init_cashshop();
}
/*
* Destroys cashshop class.
* Closes all and cleanup.
*/
int do_final_cashshop( void ){
int tab, i;
@ -285,15 +314,18 @@ int do_final_cashshop( void ){
for( i = 0; i < cash_shop_items[tab].count; i++ ){
aFree( cash_shop_items[tab].item[i] );
}
aFree( cash_shop_items[tab].item );
}
memset( cash_shop_items, 0, sizeof( cash_shop_items ) );
return 0;
}
/*
* Initializes cashshop class.
* return
* 0 : success
*/
int do_init_cashshop( void ){
cashshop_read_db();