Radian Posted September 22, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted September 22, 2014 How can i add more function on this NPC? I was planning that each guild castle will have a different buffs. [ example prtg_cas01 = can use FCP and prtg_cas02 = can use Blessing and Agility? ] - script GuidBuff::GuildBuff -1,{ //if(getcastledata(strnpcinfo(2),1) == getcharid(2)){ if(getcastledata("prtg_cas01",1) == getcharid(2)){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; sc_start SC_ASPDPOTION2,360000,0; sc_start SC_STRFood,360000,5; sc_start SC_AGIFood,360000,5; sc_start SC_VITFood,360000,5; sc_start SC_INTFood,360000,5; sc_start SC_DEXFood,360000,5; sc_start SC_LUKFood,360000,5; sc_start SC_HitFood,1200000,30; sc_start SC_FleeFood,1200000,30; sc_start SC_BATKFood,1200000,5; sc_start SC_MATKFood,120000,5; switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) set .@spirit, 494; } if ( .@spirit ) { sc_start4 sc_spirit, 360000, 5, .@spirit,0,0; skilleffect .@spirit, 5; } } end; } //add more duplicates here mellina,74,82,5 duplicate(GuildBuff) Guild Buffer#aldeg_cas01 696 //gefg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#gefg_cas01 696 //payg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#payg_cas01 696 //prtg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#prtg_cas01 696 Quote Link to comment Share on other sites More sharing options...
HD Scripts Posted September 22, 2014 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 184 Reputation: 15 Joined: 06/10/12 Last Seen: 11 hours ago Share Posted September 22, 2014 Make a equal NPC, but insert this check: if(getcastledata("prtg_cas01",1) == getcharid(2)){ It changes “prtg_cas01” for the castle that to want, and adds buffs below ex: - script GuidBuff::GuildBuff -1,{ if(getcastledata("prtg_cas01",1) == getcharid(2)){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; sc_start SC_ASPDPOTION2,360000,0; sc_start SC_STRFood,360000,5; sc_start SC_AGIFood,360000,5; sc_start SC_VITFood,360000,5; sc_start SC_INTFood,360000,5; sc_start SC_DEXFood,360000,5; sc_start SC_LUKFood,360000,5; sc_start SC_HitFood,1200000,30; sc_start SC_FleeFood,1200000,30; sc_start SC_BATKFood,1200000,5; sc_start SC_MATKFood,120000,5; switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) set .@spirit, 494; } if ( .@spirit ) { sc_start4 sc_spirit, 360000, 5, .@spirit,0,0; skilleffect .@spirit, 5; } } if(getcastledata("prtg_cas02",1) == getcharid(2)){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; } end; } //add more duplicates here mellina,74,82,5 duplicate(GuildBuff) Guild Buffer#aldeg_cas01 696 //gefg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#gefg_cas01 696 //payg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#payg_cas01 696 //prtg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#prtg_cas01 696 Quote Link to comment Share on other sites More sharing options...
Radian Posted September 22, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 22, 2014 Make a equal NPC, but insert this check: if(getcastledata("prtg_cas01",1) == getcharid(2)){ It changes “prtg_cas01” for the castle that to want, and adds buffs below ex: - script GuidBuff::GuildBuff -1,{ if(getcastledata("prtg_cas01",1) == getcharid(2)){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; sc_start SC_ASPDPOTION2,360000,0; sc_start SC_STRFood,360000,5; sc_start SC_AGIFood,360000,5; sc_start SC_VITFood,360000,5; sc_start SC_INTFood,360000,5; sc_start SC_DEXFood,360000,5; sc_start SC_LUKFood,360000,5; sc_start SC_HitFood,1200000,30; sc_start SC_FleeFood,1200000,30; sc_start SC_BATKFood,1200000,5; sc_start SC_MATKFood,120000,5; switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) set .@spirit, 494; } if ( .@spirit ) { sc_start4 sc_spirit, 360000, 5, .@spirit,0,0; skilleffect .@spirit, 5; } } if(getcastledata("prtg_cas02",1) == getcharid(2)){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; } end; } //add more duplicates here mellina,74,82,5 duplicate(GuildBuff) Guild Buffer#aldeg_cas01 696 //gefg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#gefg_cas01 696 //payg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#payg_cas01 696 //prtg_cas01,<x>,<y>,0 duplicate(GuildBuff) Guild Buff#prtg_cas01 696 I see, i will test it thanks for the response! Quote Link to comment Share on other sites More sharing options...
Question
Radian
How can i add more function on this NPC?
I was planning that each guild castle will have a different buffs. [ example prtg_cas01 = can use FCP and prtg_cas02 = can use Blessing and Agility? ]
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.