Jump to content
  • 0

Help on Healer+ buffer script


Question

Posted

hi can someone edit this script with food buffs on it like +10agi +10vit +10int +10dex +10str

 

and add a waitingroom on it. cause im putting this but not working.
 

 

OnInit:
    waitingroom "text here",0;
    end;
}

 

 

 

HERE's the script :

/*
Author         : 2essydev
NPC    Name    : Healer+
Description    :     An in-game configurable Healer.    Level 99 GM can
                configure the buff list.
Version        : 1.0
*/

prontera,151,189,6    script     Kuya Elly Healer    899,{

goto hscript;
OnInit:
    waitingroom "Kuya Elly Healer",0;
    end;
}


// ---------------------------------------------------------------------
//                         -- NPC Configuration --
// !! DONT TOUCH THIS WHEN YOU ARE NOT SURE WHAT YOU ARE TRYING TO DO !!
// ---------------------------------------------------------------------
//Arrays
//[0] = Blessing            [7] = Shield CP            [14] = Kaupe
//[1] = Increase Agi        [8] = Armor CP            [15] = True Sight
//[2] = Suffragium            [9] = Helm CP            [16] = Wind Walk
//[3] = Aspersio            [10] = Concentration    [17] = Poem of Bragis
//[4] = Weapon Perfection    [11] = Assumptio
//[5] = Over Thrust            [12] = Kaizel
//[6] = Weapon CP            [13] = Kaahi
//
//Default Buff is Blessing and Increase Agility

setarray .buffstr$[0],"Blessing","Increase Agility","Suffragium","Aspersio","Weapon Perfection",
                    "Over Thrust","Weapon CP","Shield CP","Armor CP","Helm CP","Concentration",
                    "Assumptio","Kaizel","Kaahi","Kaupe","True Sight","Wind Walk","Poem of Bragis";

setarray .buffcode[0],30,32,36,37,44,45,72,73,74,75,110,115,147,148,149,120,121,175;
setarray .bufflevl[0],10,10,3,5,5,5,5,5,5,5,5,5,7,7,3,10,10,10;

if($gmconfiguration == 0) setarray $buffconf[0],1,1,0,0,0,0,0,0,0,0,0,0,0,0,0;

// ---------------------------------------------------------------------
//                         -- Basic Configuration --
//                     This is the basic configuration
// ---------------------------------------------------------------------
set .npcname$,"[ ^3a68ffHealer^000000 ]";
set .gmlevel,99;        // Min GM Level to do in-game configuration (See conf/groups.conf for group_id's lists)
set .buffduration,5;     // Buff Duration in minute
end;
// ---------------------------------------------------------------------


hscript:
// The script starts here...
if(getgmlevel() >= .gmlevel) {
mes .npcname$;
mes "Good day, GM "+strcharinfo(0)+".";
mes "What kind of change you want to make today ?";
menu "~ Add / Remove a Buff",h_addbuff,
        "~ Set all back to Default",h_default,
        "~ Turn on all the buff",h_all,
        "~ Give me Heal and Buff",h_skip;

h_addbuff:
    do {
        set @bufflist$,"";
        set @finish,0;
        for (set @i,0;    @i <= (getarraysize(.buffstr$)-1); set @i,@i+1) {
        if ($buffconf[@i] == 0) set @color$,"^FF0000";
        if ($buffconf[@i] == 1) set @color$,"^49b01c";
        set @bufflist$,""+@bufflist$+":"+@color$+.buffstr$[@i]+"^000000";
        }
        set @bufflist$,delchar(@bufflist$, 0);
        next;
        
        set @skillon,(select(@bufflist$) - 1);
        
        if ($buffconf[@skillon] == 0) {
        set $buffconf[@skillon],1;
        set $gmconfiguration,1;
        } else {
        set $buffconf[@skillon],0;
        set $gmconfiguration,1;
        }
        
        next;
        mes .npcname$;
        if ($buffconf[@skillon] == 1) mes "You have added ^3c9cff"+.buffstr$[@skillon]+"^000000.";
        if ($buffconf[@skillon] == 0) mes "You have removed ^ff0000"+.buffstr$[@skillon]+"^000000.";
        mes "Do you want to continue ?";
        if(select("Yes:No")==2) set @finish,1;
    }
    while (@finish == 0);
    end;

h_default:
next;
mes .npcname$;
mes "Are you sure to revert all the changes back to default ?";
mes "^ff0000NOTE : THIS WILL REMOVE ALL YOUR PREVIOUS CONFIGURATION.";
if(select("No:Yes") == 1) end;
set $gmconfiguration,0;
setarray $buffconf[0],1,1;
end;

h_all:
next;
mes .npcname$;
mes "Are you sure to turn ON all the Buff ?";
if(select("No:Yes") == 1) end;
set $gmconfiguration,1;
for(set @i,0; @i <= (getarraysize(.buffcode)-1); set @i,@i+1) setarray $buffconf[@i],1;
end;


h_skip:

}
    
for( set @i,0; @i <= (getarraysize(.buffcode)-1); set @i,@i+1 ) {
    if ($buffconf[@i] == 1) {
    sc_start .buffcode[@i],.buffduration*60*1000,.bufflevl[@i];
    }
}
percentheal 100,100;
end;

}



 

 

2 answers to this question

Recommended Posts

Posted


prontera,151,189,6 script Kuya Elly Healer 899,{

function AddBuff;

if ( getgmlevel() >= .gmlevel ) callsub L_GMConfig;

for( ; .@i < .size_buff; set .@i, .@i +1 ) {

if ( $buffconf & ( 1 << .@i ) )

sc_start .buffcode[.@i],.buffduration*60*1000,.bufflevl[.@i];

}

percentheal 100,100;

end;

L_GMConfig:

mes .npcname$;

mes "Good day, GM "+strcharinfo(0)+".";

mes "What kind of change you want to make today ?";

next;

switch( select( "~ Add / Remove a Buff",

"~ Set all back to Default",

"~ Turn on all the buff",

"~ Give me Heal and Buff" ) ) {

case 1:

while(1) {

for( set .@i, 0; .@i < .size_buff; set .@i, .@i +1 ) {

set .@color$, ( $buffconf & ( 1 << .@i ) ) ? "^49b01c" : "^FF0000" ;

set .@bufflist$, .@bufflist$ + .@color$ + .buffstr$[.@i] +"^000000" +":";

}

next;

set .@s, select( .@bufflist$ ) -1;

set $buffconf, $buffconf ^ ( 1 << .@s );

next;

mes .npcname$;

mes "You have "+ ( $buffconf & ( 1 << .@s ) ? "added" : "removed" ) +" ^3c9cff"+ .buffstr$[.@s] +"^000000.";

mes "Do you want to continue ?";

next;

if( select("Yes:No")==2 ) end;

set .@bufflist$, "";

}

case 2:

mes .npcname$;

mes "Are you sure to revert all the changes back to default ?";

mes "^ff0000NOTE : THIS WILL REMOVE ALL YOUR PREVIOUS CONFIGURATION.";

next;

if(select("No:Yes") == 2)

set $buffconf, 3;

end;

case 3:

mes .npcname$;

mes "Are you sure to turn ON all the Buff ?";

next;

if(select("No:Yes") == 2) {

for( set .@i, 0; .@i < .size_buff; set .@i, .@i +1 )

set $buffconf, $buffconf | ( 1 << .@i );

}

end;

case 4: return;

}

OnInit:

//Default Buff is Blessing and Increase Agility

// <skill lvl>, <sc_ const>, <skill name to display>

AddBuff( 10, 30, "Blessing" );

AddBuff( 10, 32, "Increase Agility" );

AddBuff( 3, 36, "Suffragium" );

AddBuff( 5, 37, "Aspersio" );

AddBuff( 5, 44, "Weapon Perfection" );

AddBuff( 5, 45, "Over Thrust" );

AddBuff( 5, 72, "Weapon CP" );

AddBuff( 5, 73, "Shield CP" );

AddBuff( 5, 74, "Armor CP" );

AddBuff( 5, 75, "Helm CP" );

AddBuff( 5, 110,"Concentration" );

AddBuff( 5, 115,"Assumptio" );

AddBuff( 7, 147,"Kaizel" );

AddBuff( 7, 148,"Kaahi" );

AddBuff( 3, 149,"Kaupe" );

AddBuff( 10, 120,"True Sight" );

AddBuff( 10, 121,"Wind Walk" );

AddBuff( 10, 175,"Poem of Bragis" );

AddBuff( 10, 203,"Food Str +10" );

AddBuff( 10, 204,"Food Agi +10" );

AddBuff( 10, 205,"Food Int +10" );

AddBuff( 10, 206,"Food Vit +10" );

AddBuff( 10, 207,"Food Dex +10" );

AddBuff( 10, 208,"Food Luk +10" );

if ( $buffconf == 0 ) set $buffconf, 3;// default

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

// -- Basic Configuration --

// This is the basic configuration

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

set .npcname$,"[ ^3a68ffHealer^000000 ]";

set .gmlevel,99; // Min GM Level to do in-game configuration (See conf/groups.conf for group_id's lists)

set .buffduration,5; // Buff Duration in minute

waitingroom "Kuya Elly Healer",0;

end;

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

function AddBuff {

set .bufflevl[ .size_buff ], getarg(0);

set .buffcode[ .size_buff ], getarg(1);

set .buffstr$[ .size_buff ], getarg(2);

set .size_buff, .size_buff +1;

}

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...