Jump to content

Recommended Posts

Posted

you can just create another simple script to do that trick

OnPCLoadMapEvent:
if( strcharinfo(3) == "mapname" && !getcharid(2) ){
   mes "You cant stay here because you didnt have a guild.";
   close2;
   warp "SavePoint",0,0;
}
end;

mapname    mapflag    loadevent

Posted

@Emistry: No, it's not that easy. x.x I set mapflags only on non-active castles, and everything is dynamically set/removed so it's much more work to modify. xD

Posted

i know...just point him another simple way since he just want to kick out those character from the woe castle map if those character doesnt have any guild with them.

so i think it should be fine with that script.

and of course add it independently...

otherwise..just do it like this

replace

if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0;

witht this

if (compare(strcharinfo(3),"g_cas") || !getcharid(2) ) warp "SavePoint",0,0;
Posted

Hi @Euphy

I just create a quest shop for headgears using your Quest Shop. Then, when I purchase 1 of the headgears, only the zeny will cost and not the required items. Please check my screenshot and the script I modified.

It is only show the zeny requirement and not the quest item requirements.

post-374-0-95647000-1344064726_thumb.jpg

and then...

post-374-0-69183000-1344064738_thumb.jpg

This is the script:

p_t.txt

Posted

@Jezu: You formatted it incorrectly.

Add(1,5060,1,1000000,0,0,2236,1,7151,100,7111,100);

There's an extra 0, in there, which is throwing off the item check.

Posted

Oh olay. So I need to remove the extra zero.

Thanks and wil feed back later. Anyway what is tje max limit on headgears to be inputed on quest shop?

Posted

i am using your quest shop but when i make another shop and put again the script. it doesnt work, i will i make multiple shop with a same script? what will i change?

Posted

@bVersatile

if you have more than 1 the same script, you have to rename the All the NPCs name that appear within the scripts...ALL

Posted

@Jhosef: That question has been answered many, many times already (within this thread alone).

@mofo: Sure. It's already coded, and I was just waiting for the skills to be completed. I'll add it to the official Job Master later, too, thanks for reminding me!

@bVersatile: Find & Replace "qshop" with anything else.

  • Upvote 1
Posted

Euphy!! Great job man, i love your scripts!

I have a question.. there is an option to show the Zeny cost.. but im going to use this script to sell items in cash, the question is, is there a way to show the cash value ?

I was thinking in change this

set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no)

npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);

Posted (edited)

@euphy

why my treasure chest is only respawn 1 not every day?

@joseph this is Euphy related posted for your problem.

@Brynner: I'm starting to sound like a broken record... My WOE Controller does not control treasure spawns. The official scripts do that at 00:01 every day.

Edited by hendra814
Posted

@Kusoo: If you're only using cash, why not use a cashshop?

<map,x,y,facing>    cashshop    <npc name>    <sprite>,<item:cost>{,...}

Posted (edited)

Hello Euphy,

im using your Quest shop, or more i try using it.

Im yousing your script only changed the text of the npc into my language, didnt changed anything else.

My problem is, i want more then 5 items fpr some weapons/headgears, but each headgear having more then 5 requirements doenst show up in the shop.

wich thing do i need to change in this script that i can add more then 5 requirements?

Edited by Achhandrian
Posted (edited)

Here is the Script:

//===== rAthena Script =======================================

//= Euphy's Questi die Fee

//===== By: ==================================================

//= Euphy

//===== Current Version: =====================================

//= 1.4a

//===== Compatible With: =====================================

//= rAthena SVN r15340+

//===== Description: =========================================

//= A dynamic Questi die Fee based on Lunar's, with easier config.

//= Includes support for multiple shops & cashpoints.

//= Item Preview script by ToastOfDoom.

//============================================================

maintown,49,117,4 script Questi die Fee 438,{

function Add; function Chk; function Slot; function A_An;

if(.Shops$ != "") set .@i,1;

else {

set .@menu$,"";

for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)

set .@menu$, .@menu$+.Shops$[.@i]+":";

set .@i, select(.@menu$); }

dispbottom "Select one item at a time.";

callshop "qshop"+.@i,1;

npcshopattach "qshop"+.@i;

end;

function Add {

if (getitemname(getarg(1))=="null") {

debugmes "Quest Belohnung #"+getarg(1)+" ungültig (Übersprungen)."; return; }

for(set .@n,5; .@n<127; set .@n,.@n+2) {

if (!getarg(.@n,0)) break;

if (getitemname(getarg(.@n))=="null") {

debugmes "Quest Vorraussetzung #"+getarg(.@n)+" ungültig (Übersprungen)."; return; } }

for(set .@i,2; .@i<.@n; set .@i,.@i+1)

set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i);

npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);

return; }

function Chk {

if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; }

else return "^00FF00"; }

function Slot {

set .@s$,getitemname(getarg(0));

switch(.ShowSlot){

case 1: if (!getitemslots(getarg(0))) return .@s$;

case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]";

default: return .@s$; } }

function A_An {

setarray .@A$[0],"a","e","i","o","u";

set .@B$, "_"+getarg(0);

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

if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);

return "a "+getarg(0); }

OnBuyItem:

set .@q[0],@bought_nameid;

copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]"));

if (!.@q[1]) { message strcharinfo(0),"Ein Fehler ist aufgetreten."; end; }

mes "[Questi die Fee]";

mes "Belohnung: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000";

mes "Vorrausetzungen:";

if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000";

if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000";

if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)

mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000";

next;

set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11);

addtimer 1000, strnpcinfo(1)+"::OnEnd";

while(1){

switch(select(" ~ Kaufen ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512)) && @qe2>0 && !@qe6)?" ~ Anprobieren...":"")+": ~ ^777777Abbrechen^000000")) {

case 1:

if (@qe0) {

mes "[Questi die Fee]";

mes "Du hast nicht alles dabei für diesen Gegenstand.";

close; }

if (!checkweight(.@q[0],.@q[1])) {

mes "[Questi die Fee]";

mes "^FF0000Du brauchst "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" freien Weight für diesen Handel.^000000";

close; }

if (.@q[2]) set Zeny, Zeny-.@q[2];

if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3];

if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)

delitem .@q[.@i],.@q[.@i+1];

getitem .@q[0],.@q[1];

if (.Announce) announce strcharinfo(0)+" has created "+A_An(getitemname(.@q[0]))+"!",0;

specialeffect2 699;

close;

case 2:

set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5);

if (@qe1&1) atcommand "@changelook 3 "+@qe2;

if (@qe1&256) atcommand "@changelook 1 "+@qe2;

if (@qe1&512) atcommand "@changelook 2 "+@qe2;

set @qe6,1;

break;

case 3:

close; } }

OnEnd:

if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; }

for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0;

end;

OnInit:

freeloop(1);

// --------------------- Config ---------------------

// Custom points, if needed: "<variable>","<name to display>"

setarray .Points$[0],"#CASHPOINTS","Cash Points";

set .Announce,0; // Announce quest completion? (1: yes / 0: no)

set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)

set .DisplayID,0; // Show item IDs? (1: yes / 0: no)

set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no)

// Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...};

// Duplicate dummy data for any additional shops (bottom of script).

// If no categories, use the second line instead (remove //).

setarray .Shops$[1],"Headgears","Waffen";

// set .Shops$,"n/a";

// Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,

// <required item ID>,<required item amount>{,...});

// Shop number corresponds with order above (default is 1).

// Note: Do NOT use a reward item more than once!

Add(1,20076,1,10000,0,602,100,7168,100,924,100,4040,20,4210,10);

Add(2,24000,1,250000000,0,13414,2,1013,250,622,250,969,100,7079,2,7086,2,7073,2,7077,2,7092,2,7088,2,7087,2,7830,2,7833,2,7835,1,7836,1,7837,17831,1);

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

freeloop(0);

for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)

npcshopdelitem "qshop"+.@i,909;

end;

}

// -------- Dummy data (duplicate as needed) --------

- shop qshop1 -1,909:-1

- shop qshop2 -1,909:-1

Just changed the language and the name of the npc.

Edited by Achhandrian
Posted

@Achhandrian: My script automatically checks for errors, but you still have to read your mapserver...

[Debug]: script debug : 0 110013326 : Quest requirement #1 invalid (skipped).

And looking at your script, you messed up here:

...7837,17831,1);

Posted (edited)

can i ask if there is a script for donations NPC here? that i can put a custom items and buy it with proof of donations[POD]

thank you and more power

Edited by xtianresente
Posted

bro I'm just wondering why I'm having some bugs when I use the reset npc. At first I can manage to fill in my skill points but when I reset my skills sometimes I can't fill in my skills anymore. Is this a bug?

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.

  • Recently Browsing   0 members

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