Jump to content
  • 0

item requirement


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

hi, all  i need help to make this npc cost 5 poring coin every use this npc

 

Quote

//####################################################
//#                              ™ #
//#   ####### ######  ###   ### ###   ### ###   ###  #
//#   ###    ###  ###  ### ###   ### ###   ### ###   #
//#   #####  ###  ###   ####      ####      #####    #
//#   ##     ###  ###  ### ###   ### ###     ###     #
//#   ##      ######  ###   ### ###   ###   ###      #
//#                                                  #
//####################################################
//v1.0: Allows changing suits to 3rd classes;        #
//v1.1: Added Xmas and Summer suits;                 #
//v1.2: Added support to baby 3rd class suits.       #
//####################################################
prontera,172,182,5    script    Class Suits    485,{
    
// Settings
    set .mode, 0; // Set it as following: 0 - Transcendent 2nd to 3rd class suits ; 1 - Transcendent 2nd to normal and baby 3rd class, also 3rd to baby 3rd; 2 - Transcendent 2nd to 3rd class suits and xmas, summer suits; 3 - 2nd to normal and baby 3rd class, also normal 3rd to baby 3rd plus xmas,summer.
    set .item, 7539;


    if (.mode == 0) goto normal;
    if (.mode == 1) goto babies;
    if (.mode == 2) goto misc;
    if (.mode == 3) goto babymisc;

normal:
    mes "[Suit Provider]";
    mes "So, wanna change your appearance?";
    mes("and you need pay me with 5 porin coin");
    menu "Change to 3rd class suit",thirdclass,"Reset appearance",reset;

babies:
    mes "[Suit Provider]";
    mes "So, wanna change your appearance?";
    menu "Change to 3rd class suit",thirdclass,"Change to 3rd class baby suit",babythirdclass,"Reset appearance",reset;

misc:
    mes "[Suit Provider]";
    mes "So, wanna change your appearance?";
    menu "Change to class suit",thirdclass,"Extra suits",miscsuits,"Reset appearance",reset;

babymisc:
    mes "[Suit Provider]";
    mes "So, wanna change your appearance?";
    menu "Change to class suit",thirdclass,"Change to 3rd class baby suit",babythirdclass,"Extra suits",miscsuits,"Reset appearance",reset;

thirdclass:
    
    if(class == Job_Lord_Knight) { changebase 4060; close; end; }
    if(class == Job_Assassin_Cross) { changebase 4065; close; end; }
    if(class == Job_Paladin) { changebase 4073; close; end; }
    if(class == Job_Whitesmith) { changebase 4064; close; end; }
    if(class == Job_Creator) { changebase 4078; close; end; }
    if(class == Job_Stalker) { changebase 4079; close; end; }
    if(class == Job_Professor) { changebase 4074; close; end; }
    if(class == Job_Gypsy) { changebase 4076; close; end; }
    if(class == Job_Champion) { changebase 4077; close; end; }
    if(class == Job_Sniper) { changebase 4062; close; end; }
    if(class == Job_Clown) { changebase 4075; close; end; }
    if(class == Job_High_Wizard) { changebase 4061; close; end; }
    if(class == Job_High_Priest) { changebase 4063; close; end; }
    else { next; mes "[Suit Provider]"; mes "I'm sorry, but your class is not supported."; close; end; }
    }
    

babythirdclass:
    if(class == Job_Lord_Knight) { changebase 4096; close; end; }
    if(class == Job_Assassin_Cross) { changebase 4101; close; end; }
    if(class == Job_Paladin) { changebase 4102; close; end; }
    if(class == Job_Whitesmith) { changebase 4100; close; end; }
    if(class == Job_Creator) { changebase 4107; close; end; }
    if(class == Job_Stalker) { changebase 4108; close; end; }
    if(class == Job_Professor) { changebase 4103; close; end; }
    if(class == Job_Gypsy) { changebase 4105; close; end; }
    if(class == Job_Champion) { changebase 4106; close; end; }
    if(class == Job_Sniper) { changebase 4098; close; end; }
    if(class == Job_Clown) { changebase 4104; close; end; }
    if(class == Job_High_Wizard) { changebase 4097; close; end; }
    if(class == Job_High_Priest) { changebase 4099; close; end; }
    if(class == Job_Rune_Knight_T) { changebase 4096; close; end; }
    if(class == Job_Guillotine_Cross_T) { changebase 4101; close; end; }
    if(class == Job_Royal_Guard_T) { changebase 4102; close; end; }
    if(class == Job_Mechanic_T) { changebase 4100; close; end; }
    if(class == Job_Genetic_T) { changebase 4107; close; end; }
    if(class == Job_Shadow_Chaser_T) { changebase 4108; close; end; }
    if(class == Job_Sorcerer_T) { changebase 4103; close; end; }
    if(class == Job_Wanderer_T) { changebase 4105; close; end; }
    if(class == Job_Sura_T) { changebase 4106; close; end; }
    if(class == Job_Ranger_T) { changebase 4098; close; end; }
    if(class == Job_Minstrel_T) { changebase 4104; close; end; }
    if(class == Job_Warlock_T) { changebase 4097; close; end; }
    if(class == Job_Arch_Bishop_T) { changebase 4099; close; end; }
    else { next; mes "[Suit Provider]"; mes "I'm sorry, but your class is not supported."; close; end; }

reset:
    changebase Class;
    close;
    end;

miscsuits:
    next;
    mes "[Suit Provider]";
    mes "Which of the suits would you like to use?";
    menu "Xmas suit",xmas,"Summer suit",summer;

xmas:
    changebase 26;
    close;
    end;

summer:
    changebase 27;
    close;
    end;

}

thx

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

22 minutes ago, melv0 said:

yeah, i know about that, but player still must have 5 porco to appear that menu right???

prontera,172,182,5    script    Suit Changer    123,{
@eac = eaclass();

mes .npc$;
mes "Hello "+strcharinfo(0)+".
mes "I am the Suit Changer";
next;
mes .npc$;
mes "You need ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000 ";
mes "To use my service.";
mes "Note - Resetting is free";
next;
mes "How can I help you today?";
next;
	switch(select("Change to 3rd Class Suit:Reset Appearance:Special Suits:Nothing")) {
		case 1:
			if(countitem(.item[0]) < .amount[0]){
			goto NotEnough;
			} else {
			changebase(roclass(@eac|EAJL_THIRD));
			goto Payment;
			}
			end;
		case 2:
			changebase Class;
			end;
		case 3:
			switch(select("Xmas Suit:Summer Suit")) {
				case 1:
					if(countitem(.item[0]) < .amount[0]){
					goto NotEnough;
					} else {
					changebase 26;
					goto Payment;
					end;
				case 2:
					if(countitem(.item[0]) < .amount[0]){
					goto NotEnough;
					} else {
					changebase 27;
					goto Payment;
					end;
					}
		case 4:
			mes .npc$;
			mes "Okay, Have a nice day";
			close;
				}
			}
Payment:
	delitem .item[0],.amount[0];
	end;
NotEnough:
	mes .npc$;
	mes "You don't have enough ^00FF005"+ getitemname(.item[0]) +"^000000";
	next;
	mes "Come back if you have ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000";
	close;
	
OnInit:
.npc$ = "[Suit Changer]";
setarray .item, 7539;
setarray .amount, 5;
}

 

Edited by crazyarashi
Fixed small typos
  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

prontera,172,182,5    script    Suit Changer    123,{
@eac = eaclass();

mes .npc$;
mes "Hello "+strcharinfo(0)+".
mes "I am the Suit Changer";
next;
if(countitem(.item[0]) < .amount[0]){
mes .npc$;
mes "You need ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000 ";
mes "To use my service";
next;
mes .npc$;
mes "Come back if you have ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000";
close;
} else {
mes "How can I help you today?";
next;
	switch(select("Change to 3rd Class Suit:Reset Appearance:Special Suits:Nothing")) {
		case 1:
			changebase(roclass(@eac|EAJL_THIRD));
			goto Payment;
			end;
		case 2:
			changebase Class;
			goto Payment;
			end;
		case 3:
			switch(select("Xmas Suit:Summer Suit")) {
				case 1:
					changebase 26;
					goto Payment;
					end;
				case 2:
					changebase 27;
					goto Payment;
					end;
					}
		case 4:
			mes .npc$;
			mes "Okay, Have a nice day";
			close;
				}
			}
Payment:
	delitem .item[0],.amount[0];
	end;
	
OnInit:
.npc$ = "[Suit Changer]";
setarray .item, 7539;
setarray .amount, 5;
}

Try this, Not sure if it will work XD

Edited by crazyarashi
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

39 minutes ago, crazyarashi said:

prontera,172,182,5    script    Suit Changer    123,{
@eac = eaclass();

mes .npc$;
mes "Hello "+strcharinfo(0)+".
mes "I am the Suit Changer";
next;
if(countitem(.item[0]) < .amount[0]){
mes .npc$;
mes "You need ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000 ";
mes "To use my service";
next;
mes .npc$;
mes "Come back if you have ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000";
close;
} else {
mes "How can I help you today?";
next;
	switch(select("Change to 3rd Class Suit:Reset Appearance:Special Suits:Nothing")) {
		case 1:
			changebase(roclass(@eac|EAJL_THIRD));
			goto Payment;
			end;
		case 2:
			changebase Class;
			goto Payment;
			end;
		case 3:
			switch(select("Xmas Suit:Summer Suit")) {
				case 1:
					changebase 26;
					goto Payment;
					end;
				case 2:
					changebase 27;
					goto Payment;
					end;
					}
		case 4:
			mes .npc$;
			mes "Okay, Have a nice day";
			close;
				}
			}
Payment:
	delitem .item[0],.amount[0];
	end;
	
OnInit:
.npc$ = "[Suit Changer]";
setarray .item, 7539;
setarray .amount, 5;
}

Try this, Not sure if it will work XD

thx bro, but how to make function  reset appearance it's free ??

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

3 minutes ago, melv0 said:

thx bro, but how to make function  reset appearance it's free ??

just remove the goto Payment; in case 2 :))

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

yeah, i know about that, but player still must have 5 porco to appear that menu right???

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

1 minute ago, crazyarashi said:

prontera,172,182,5    script    Suit Changer    123,{
@eac = eaclass();

mes .npc$;
mes "Hello "+strcharinfo(0)+".
mes "I am the Suit Changer";
next;
mes .npc$;
mes "You need ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000 ";
mes "To use my service.";
mes "Note - Resetting is free";
next;

next;
mes "How can I help you today?";
next;
	switch(select("Change to 3rd Class Suit:Reset Appearance:Special Suits:Nothing")) {
		case 1:
			if(countitem(.item[0]) < .amount[0]){
			goto NotEnough;
			} else {
			changebase(roclass(@eac|EAJL_THIRD));
			goto Payment;
			}
			end;
		case 2:
			changebase Class;
			end;
		case 3:
			switch(select("Xmas Suit:Summer Suit")) {
				case 1:
					if(countitem(.item[0]) < .amount[0]){
					goto NotEnough;
					} else {
					changebase 26;
					goto Payment;
					end;
				case 2:
					if(countitem(.item[0]) < .amount[0]){
					goto NotEnough;
					} else {
					changebase 27;
					goto Payment;
					end;
					}
		case 4:
			mes .npc$;
			mes "Okay, Have a nice day";
			close;
				}
			}
Payment:
	delitem .item[0],.amount[0]);
	end;
NotEnough:
	mes .npc$;
	mes "You don't have enough ^00FF005"+ getitemname(.item[0]) +"^000000";
	next;
	mes "Come back if you have ^00FF005"+ getitemname(.item[0]) +" "+.amount[0]+"^000000";
	close;
	
OnInit:
.npc$ = "[Suit Changer]";
setarray .item, 7539;
setarray .amount, 5;
}

 

thx a loot bro :D

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

@crazyarashi hi bro how to make this function permanent?

coz when player relog  become into normal suit again 

Edited by melv0
Link to comment
Share on other sites

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.

×
×
  • Create New...