Jump to content

✰ Euphy's Scripts ✰


Euphy

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Error on mvp ladder. Im using eA emulator!
The version I posted here will work only on rAthena.

Anyway, thanks for your script collection Euphy ^_^

Edited by nanakiwurtz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Added a Hunting Missions quest. Try it!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Great Hunting Missions script! My suggestion is add a if (select("Accept/Decline") == 2) before forcing player accept mission :P

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@darristan: I thought about that, but it's not as fun if you get to choose your mission. This is all luck! xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

@euphy: That is in my mind tho, so what I actually meant is to accept/decline but it won't re-roll the quest monsters for you. :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  123
  • Reputation:   9
  • Joined:  08/20/12
  • Last Seen:  

i tried it, its great

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Btw, not sure why It couldn't work with your quest shop, I got bugged when enabled both. All those shops only show Jellopy/Apple for no reason.

Edit: Figured out, it's the OnInit problem :P

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Hunting Missions updated to v1.1. Mostly small things, the most important being delay calculation and a matching monster name check (ex. so you don't get multiple Goblins to hunt).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  123
  • Reputation:   9
  • Joined:  08/20/12
  • Last Seen:  

^thats what i thought. since i got acidus and plasma, at the same time @_@. i had no idea which one is which

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@Vanyrl: That's a very good point. In v1.1a, NPC kills now compare monster name instead of monster ID (so killing any Goblin will count, for example). Thanks for the idea!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Met little problem here, my main character was doing your quest half way and I created a new character while hunting Poring this shows up.

khBVc.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@darristan: I apologize, that's fixed now.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Hmmm... in SVN? I'm sure I'm using 1.1a already.

Edit: Alright got this fix, thank you again for this great script!

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I didn't update the version since I only added one variable, all the links should point to the fixed script now (SVN updated in r16781).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.01
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

how to use 2 different quest shop??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

@@Euphy

How do I add another Shop to the Hunting Missions NPC?

and remove the Exp Rewards?

Edited by Vitrue
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@angelakied: Answer is already posted multiple times - find&replace "qshop" with a different name.

@Vitrue: I pretty much copied my "Multi-Shop" script's code, so you can use that as a base to add more shops. To remove exp rewards, well, delete those lines.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

well, i am a little lost at this part

OnBuyItem:
   set @cost,0;
   for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
       for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2)
           if (@bought_nameid[.@i] == .Shop[.@j]) {
               set @cost, @cost+(.Shop[.@j+1]*@bought_quantity[.@i]);
               break;
           }
   mes "[Hunting Missions]";
   if (@cost > #Mission_Points) mes "You don't have enough Mission Points.";
   else {
       for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) {
           getitem @bought_nameid[.@i], @bought_quantity[.@i];
           dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+".";
       }
       set #Mission_Points, #Mission_Points-@cost;
       mes "Deal completed.";
       emotion e_cash;
   }
   set @cost,0;
   deletearray @bought_nameid[0], getarraysize(@bought_nameid);
   deletearray @bought_quantity[0], getarraysize(@bought_quantity);
   close;

and this

    setarray .Shop[0],    // Reward items: <ID>,<point cost> (about 10~20 points per hunt).
       20205,145,20206,145,20207,145,20208,145;

i have successfully removed the exp rewards tho. now do i need to make new arrays for the new shop if i am adding? or ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@Vitrue: Here are the changes --

	case 5:
	set @s, select(implode(.Names$,":"));
	//...
	callshop "mission_shop"+@s,1;
	npcshopattach "mission_shop"+@s;
	end;

OnBuyItem:
for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
	for(set .@j,0; .@j<getarraysize(getd(".Shop"+@s)); set .@j,.@j+2)
		if (getd(".Shop"+@s+"["+.@j+"]") == @bought_nameid[.@i]) {
			set @cost, @cost+(getd(".Shop"+@s+"["+(.@j+1)+"]")*@bought_quantity[.@i]);
			break;
		}

OnInit:
// new shop arrays (be sure to rename the first one)
setarray .Shop1[0],1202,5,1229,20;
setarray .Shop2[0],5116,15;
setarray .Names$[0],"Weapons","Headgears";

for(set .@i,1; .@i<=getarraysize(.@Names$); set .@i,.@i+1) {
	npcshopdelitem "mission_shop"+.@i,512;
	for(set .@j,0; .@j<getarraysize(getd(".Shop"+.@i)); set .@j,.@j+2)
		npcshopadditem "mission_shop"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]");
}
end;
}
// duplicate shops as necessary
-	shop	mission_shop1	-1,512:-1
-	shop	mission_shop2	-1,512:-1

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

Thanks.

Edit : worked like a charm. thanks

Edited by Vitrue
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   4
  • Joined:  01/22/12
  • Last Seen:  

how to register the mission hunting quest at the quest tab? is it possible?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@jysn: It's not possible, since quest entries are hardcoded in a database. You could theoretically convert all the possible combinations into quest_db entries; it'd be a lot of entries, though. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   12
  • Joined:  09/05/12
  • Last Seen:  

I just want to report something about the MVP Ladder. There's an error (on line 14 of the script)

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: getmapxy (4 parameters):
[Debug]: Data: variable name='.@a00000$' index=0
[Debug]: Data: variable name='.@a00001' index=0
[Debug]: Data: variable name='.@a00002' index=0
[Debug]: Data: number value=0

:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

@Vitrue: Here are the changes --

 case 5:
set @s, select(implode(.Names$,":"));
//...
callshop "mission_shop"+@s,1;
npcshopattach "mission_shop"+@s;
end;

OnBuyItem:
for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
       for(set .@j,0; .@j<getarraysize(getd(".Shop"+@s)); set .@j,.@j+2)
           if (getd(".Shop"+@s+"["+.@j+"]") == @bought_nameid[.@i]) {
               set @cost, @cost+(getd(".Shop"+@s+"["+(.@j+1)+"]")*@bought_quantity[.@i]);
               break;
           }

OnInit:
   // new shop arrays (be sure to rename the first one)
   setarray .Shop1[0],1202,5,1229,20;
   setarray .Shop2[0],5116,15;
   setarray .Names$[0],"Weapons","Headgears";

   for(set .@i,1; .@i<=getarraysize(.@Names$); set .@i,.@i+1) {
       npcshopdelitem "mission_shop"+.@i,512;
       for(set .@j,0; .@j<getarraysize(getd(".Shop"+.@i)); set .@j,.@j+2)
           npcshopadditem "mission_shop"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]");
   }
   end;
}
// duplicate shops as necessary
-    shop    mission_shop1    -1,512:-1
-    shop    mission_shop2    -1,512:-1

oh itworked but after reloading many times it just shows an apple. i didn't try it before thats why i am only telling this now

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  118
  • Reputation:   0
  • Joined:  09/19/12
  • Last Seen:  

can anyone help me remove the apple in multiple-shop script?

// -------------------- Config 1 --------------------
// For each shop added, copy this MSHOPX dummy data.
// Write your shop names in the select() function.

-	shop	MSHOP1	-1,512:-1
-	shop	MSHOP2	-1,512:-1

prontera,148,169,4    script    A Shop    984,{

set @s, select("MVP Cards:God Items");

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

message strcharinfo(0),"This shop only accepts"+getitemname(.Currency[@s])+".";
dispbottom "You have "+countitem(.Currency[@s])+""+getitemname(.Currency[@s])+".";
callshop "MSHOP"+@s,1;
npcshopattach "MSHOP"+@s;
end;

OnBuyItem:
set .@i,0;
while (.@i < getarraysize(@bought_nameid)) {
	set .@j, 0;
	while (.@j < getarraysize(getd(".Shop"+@s))) {
		if(getd(".Shop"+@s+"["+.@j+"]") == @bought_nameid[.@i]) {
			set @itemcost, (getd(".Shop"+@s+"["+(.@j+1)+"]") * @bought_quantity[.@i]);
			set @totalcost, @totalcost +@itemcost;
			break; }
	set .@j, .@j+2; }
set .@i, .@i+1; }
if (@totalcost > countitem(.Currency[@s])) dispbottom "You don't have enough "+getitemname(.Currency[@s])+".";
else {
	set .@i,0;
	while (.@i < getarraysize(@bought_nameid)) {
		getitem @bought_nameid[.@i], @bought_quantity[.@i];
		dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+".";
	set .@i, .@i+1; }
delitem .Currency[@s], @totalcost; }
set @totalcost, 0;
deletearray @bought_nameid[0], 128;
deletearray @bought_quantity[0], 128;
end;

OnInit:

// -------------------- Config 2 --------------------
// Currency:  The ID of each shop currency,
//	in the same order as the shops.
// Shop order follows that of the select() call,
//   and is formatted "ID1,Count1,ID2,Count2,..."

setarray .Currency[1],7227,7227,7227,7227,7227,7227,7227,7227;
setarray .Shop1[0],4399,3,4305,3,4302,3,4174,3,4047,2,4143,2,4330,2,4121,1;
setarray .Shop2[0],5013,25,2410,25,2629,25,2541,25,2383,20,2630,20,1530,20;

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

set .@i,1;
while (.@i <= getarraysize(.Currency)) {
	set .@j,0;
	while (.@j < getarraysize(getd(".Shop"+.@i))) {
		npcshopdelitem "MSHOP"+.@i,7227;
		npcshopadditem "MSHOP"+.@i, getd(".Shop"+.@i+"["+.@j+"]"), getd(".Shop"+.@i+"["+(.@j+1)+"]");
	set .@j, .@j+2; }
set .@i, .@i+1; }
end;
}

Edited by Euphy
Codeboxed
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
Reply to this topic...

×   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...