diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-14 23:38:11 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-14 23:38:11 +0000 |
commit | 1382b22cd68bf90f2adc4ae13187416982f9a12f (patch) | |
tree | 60602ab8f3578407bffbd1859603c3a586c52256 /npc/guild | |
parent | 78474fe9877675f3fc173f0b7e7235fd6c105067 (diff) | |
download | hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.gz hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.bz2 hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.xz hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.zip |
Guardian hp handling code removal (see bugreport:342)
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql)
- removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full)
- tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore
The whole thing is experimental, use at your own risk (seems to work though...)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/guild')
-rw-r--r-- | npc/guild/gldfunc_manager.txt | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/npc/guild/gldfunc_manager.txt b/npc/guild/gldfunc_manager.txt index b1134d92c..10d231fbf 100644 --- a/npc/guild/gldfunc_manager.txt +++ b/npc/guild/gldfunc_manager.txt @@ -143,7 +143,7 @@ function script F_GldManager { mes "I'm sorry but there is not enough zeny to invest in the reserves of guild. You have failed to invest, Master."; return 0; } - set zeny,zeny-.@eco_invest;; + set zeny,zeny-.@eco_invest; SetCastleData getarg(1),4,GetCastleData(getarg(1),4)+1; SetCastleData getarg(1),2,.@Economy + 1 + (.@Economy<99 && rand(2) && getgdskilllv(.@GID,10014)); mes "We have finished investing safely. I expect in our coming days, the growth level will increase."; @@ -194,17 +194,6 @@ function script F_GldManager { set Zeny,Zeny-.@def_invest; SetCastleData getarg(1),5,GetCastleData(getarg(1),5)+1; SetCastleData getarg(1),3,.@Defence+1; - set .@Defence, .@Defence + 1; - set .@AGuardian, strmobinfo(4,1285) + (.@Defence*2000); - set .@KGuardian, strmobinfo(4,1286) + (.@Defence*2000); - set .@SGuardian, strmobinfo(4,1287) + (.@Defence*2000); - - for (set .@i, 0; .@i <= 7 ; set .@i, .@i+1) { - if (.@guardiantype[.@i] == 1) set .@GHP,.@SGuardian; - else if (.@guardiantype[.@i] == 2) set .@GHP,.@AGuardian; - else set .@GHP,.@KGuardian; - if (GetCastleData(getarg(1),(.@i + 10)) == 1) SetCastleData getarg(1),(.@i + 18),.@GHP; - } mes "We have finished investing safely. I expect in our coming days, the growth level will increase."; return 0; } @@ -213,37 +202,26 @@ function script F_GldManager { return 0; case 4: - set .@Defence,GetCastleData(getarg(1),3); - set .@AGuardian, strmobinfo(4,1285) + (.@Defence*2000); - set .@KGuardian, strmobinfo(4,1286) + (.@Defence*2000); - set .@SGuardian, strmobinfo(4,1287) + (.@Defence*2000); - mes "[ "+getarg(0)+" ]"; mes "Do you still want to summon a Guardian? It'll be a protector to defend us to the end."; mes "Choose a Guardian to summon."; next; - for (set .@i, 0; .@i <= 7 ; set .@i, .@i+1) { - if (.@guardiantype[.@i] == 1) { - set .@type$,"Soldier"; - setarray .@GuardianHP[.@i],.@SGuardian; - } - else if (.@guardiantype[.@i] == 2) { - set .@type$,"Archer"; - setarray .@GuardianHP[.@i],.@AGuardian; - } - else { - set .@type$,"Knight"; - setarray .@GuardianHP[.@i],.@KGuardian; - } + for( set .@i, 0; .@i <= 7 ; set .@i, .@i+1 ) + { + if (.@guardiantype[.@i] == 1) set .@type$,"Guardian Soldier"; + else if (.@guardiantype[.@i] == 2) set .@type$,"Guardian Archer"; + else set .@type$,"Guardian Knight"; - if (GetCastleData(getarg(1),(.@i+10))) - setarray .@name$[.@i],"Guardian "+.@type$+" - Implemented (" + guardianinfo(.@i) + "/" + .@GuardianHP[.@i] + ")"; + if( guardianinfo(getarg(1),.@i,0) ) + setarray .@name$[.@i], .@type$ + " - Implemented (" + guardianinfo(getarg(1),.@i,2) + "/" + guardianinfo(getarg(1),.@i,1) + ")"; else - setarray .@name$[.@i],"Guardian "+.@type$+" - Not Implemented"; + setarray .@name$[.@i], .@type$ + " - Not Implemented"; } set .@menu$,.@name$[0]+":"+.@name$[1]+":"+.@name$[2]+":"+.@name$[3]+":"+.@name$[4]+":"+.@name$[5]+":"+.@name$[6]+":"+.@name$[7]; + + // this thing will propagate outside of this function switch(select(.@menu$)) { case 1: set @GDnum,10; break; case 2: set @GDnum,11; break; @@ -274,9 +252,8 @@ function script F_GldManager { return 0; } set zeny,zeny-10000; - set .@HP,@GDnum + 8; - SetCastleData getarg(1),@GDnum,1; - SetCastleData getarg(1),.@HP,.@GuardianHP[(@GDnum - 10)]; + SetCastleData getarg(1),@GDnum,1; // mark as 'installed' + // guardian will be spawned outside of this function mes "We have successfully summoned the Guardian. We now have our strong force to defend us!"; return 1; |