Jump to content

MukkiesftKies

Members
  • Posts

    123
  • Joined

  • Last visited

Posts posted by MukkiesftKies

  1. 19 hours ago, Zell said:

    To help you first, I need to understand. I can not understand your logic (since you're not passing the whole script). Does the player choose to use an item and then take the meteor stomer? choose "set super power", will do what?

    i just want to make array pass from end; when the script ends.

    for example :-
     

    setarray .@menuStrs$[0], "Warp","Fly","Shit";
     
    set @menu$,"";
    for (set @i,0; @i < getarraysize(.@menuStrs$); set @i,@i+1) {
        if (@i) set @menu$,@menu$+":";
        set @menu$,@menu$+.@menuStrs$[@i];
    }
    set @selection,select(@menu$)-1;

    i take this from https://rathena.org/board/topic/87190-how-to-use-array-as-a-menu/. 
    but when i try to put end; to the end script. array can not be read.  because i change menu to id number. like my first post.


    @Technoken

    Quote

    since you are using a scope variable(.@) for the array, it will end when the script ends. You can try to use a temporary character variable (@) instead to pass the array. Just make sure that the variable name is a unique one.

    can you show me some example ? hehe

  2. setarray .@items[0],501,502;

    switch(select("Use Super Power:Set Super Power:Close")) {
    case 1:
    if (isequipped( )) goto L_Check;

    case 2:
    for( set .@i,0; .@i < getarraysize(.@items[.@i]); set .@i,.@i + 1 )        
    set .@menu$,.@menu$+getitemname(.@items[.@i])+":";       
    .@i = select( .@menu$ ) - 1;
    end;  << if i remove this countitem can detect what item i choose but straight to L_Check, without select USE SUPER POWER.
    }

    L_Check:
    if( !countitem (.@items[.@i]) ) goto L_NotEnough;
    delitem .@items[.@i],1;
    mes "You got Meteor Storm Skill";

  3. setarray .@items[0],501,502;

    switch(select("Use Super Power:Set Super Power:Close")) {
    case 1:
    if (isequipped( )) goto L_Check;

    case 2:
    for( set .@i,0; .@i < getarraysize(.@items[.@i]); set .@i,.@i + 1 )        
    set .@menu$,.@menu$+getitemname(.@items[.@i])+":";       
    .@i = select( .@menu$ ) - 1;
    end;  << if i remove this countitem can detect what item i choose but straight to L_Check, without select USE SUPER POWER.
    }

    L_Check:
    if( !countitem (.@items[.@i]) ) goto L_NotEnough;
    delitem .@items[.@i],1;
    mes "You got Meteor Storm Skill";

  4. 12 hours ago, Jarek said:

    Double check this:

    
    if( countitem (.@items[.@i]) ) goto L_NotEnough;

    If I have this item then I go to L_NotEnough?

    Probably should be:

    
    if( !countitem (.@items[.@i]) ) goto L_NotEnough;

     

    yaa i already try. can count.
    but when i choose Yellow Potion. my map show this

    [Error]: buildin_delitem: failed to delete 1 items (AID=2000000 item_id=501).

  5. setarray .@items[0],501,502;
    
    switch(select("Adjust Effect:Close")) {
    
    case 1:
        for( set .@i,0; .@i < getarraysize(.@items[.@i]); set .@i,.@i + 1 )
            set .@menu$,.@menu$+getitemname(.@items[.@i])+":";
            .@i = select( .@menu$ ) - 1;
        end;
    }
    
    L_Check:
    if( countitem (.@items[.@i]) ) goto L_NotEnough;
            delitem .@items[.@i],1;
    mes" Ok, Your effect";

    Countitem can not find item, what problem with my script ?

  6. i like to use this script for fishing ranking top 10 ( i think this is support section )

    Fishing ranking for player got the biggest fish. Top 10.

    prontera,160,172,0	script	Fishing Hole	844,{
    	
    //Fishing rod
    set .@Rod,2764;
    //Fishing Lure
    set .@Lure,2775;
    //Auto-Fish
    set .@Auto,1;
    //Auto-Fish on Fail
    set .@AutoFail,1;
    Fish:
    	if (isequipped(.@Rod)) && (isequipped(.@Lure)){
    		specialeffect EF_BUBBLE,"Fishing Hole";
    		soundeffect "fishingrod.wav",0;
    		dispbottom "[Fishing] Casting...";
    		set .@fcast,15;
    			if (isequipped(2550)) { //Fisher's Muffler
    				set .@fcast,.@fcast - 2;
    			}
    			if (isequipped(2443)) { //Fisher's Boots
    				set .@fcast,.@fcast - 2;
    			}
    			if (isequipped(2764)) { //Fishing Pole
    				set .@fcast,.@fcast - 3;
    			}
    			if (isequipped(2775)) { //Fishing Lure
    				set .@fcast,.@fcast - 1;
    			}
    		progressbar "ffffff",.@fcast;
    		if (rand(1,20) == 2){
    		getitem 6096,1; //Fish with Blue Back
    		specialeffect2 EF_TEMP_OK;
    		soundeffectall "success.wav",0,strcharinfo(3);
    		mapannounce strcharinfo(3),strcharinfo(0)+" has caught a Blue Fish!",bc_map,"0xff77ff";
    		if(.@Auto==1){
    		goto Fish;}else{
    		end;}
    		}
    			if (rand(1,6) == 1) ||(rand(1,6) == 3) || (rand(1,6) == 6){
    			setarray .@Catch[0],579,908,909,963,956,6049,918,960,910,938,624;// List of Junk/Other
    			set .@CatchRand,.@Catch[rand(getarraysize(.@Catch))];
    			getitem .@CatchRand,1;
    			}
    			else {
    			dispbottom "[Fishing] Nothing was caught...";
    			if(.@AutoFail == 1){
    			goto Fish;} else{
    			end;}
    			}
    		if (rand(1,100) == 3){
    		setarray .@Rare[0],644,603,617;
    		set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))];
    		getitem .@RareCatch,1; //Reward
    		mapannounce strcharinfo(3),strcharinfo(0)+" has caught a "+getitemname(.@RareCatch)+"!",bc_map,"0x33CC00";
    		}
    		if(.@Auto == 1){
    		goto Fish;} else{
    		end;}
    		}
    	else {
    	dispbottom "[Fishing] You need a Rod and Lure.";
    	end;
    	}
    }

    and the last. if you remember about hangman event with cutin.


     

  7. 14 minutes ago, sader1992 said:

    still the same

    .variable is an npc variable not global variable

    .count in npc1 != .count in npc2

    so var must be  ($count > 3) right ?
    i already try and it work. lol lol lol lol lol /thx/sry

    i spend time with this var for 3 hour and i don't know what i do.

  8. 1 hour ago, sader1992 said:

    i probably wont answer the question cuz i didn't understand what is the script about

    but what is .count ?

    it's a variable for nothing

    your kill event does not do anything

    this is my full script

     

    prontera,155,157,5	script	Haruhi Suzumiya	500,{
    if (.knsON) goto L_START;
    
    set .@n$,"*** ^800000Event Employee^000000 ***";
    //--- Dialog When Event Start ----\\
    
    L_Start:
    	if (.count > 5 ) goto L_ANGRY;
    	mes .@n$;
    	mes"I lost my school bag. I think someone steal and I know";
    	mes"him but I'm no sure.";
    	emotion ET_CRY;
    	next;
    	mes .@n$;
    	mes"Very big and tall.";
    	mes"Maybe people, maybe monster!";
    	next;
    	mes .@n$;
    	mes"Arghh! I don't know.";
    	next;
    	switch(select("Cooldown. Your school bag safe now.:Hahaha, I dont care about you.")){
    case 1:
    		if ( countitem(501) ) {
    		mes .@n$;
    		//-- bring item and get reward --\\
    		mes"Thank you so much!";
    		mes"Take this as my thanks";
    		getitem 502,100;
    		close;
    		} else {
    				mes .@n$;
    				//-- not enough item. --\\
    				mes"Are you try to kidding me?";
    				emotion ET_HNG;
    				sleep2 1000;
    				mes"How dare you?!";
    				close;
    			}
    case 2:
    		mes .@n$;
    		mes"How dare you?!";
    		sleep2 1000;
    		mes"I will make sure";
    		mes"you will regret."+ .count +"";
    			if (!#onetimes) {
    				set #onetimes,1;
    				.count++;
    				sleep2 1000;
    				emotion ET_HNG;
    				close;
    			}
    		sleep2 1000;
    		emotion ET_HNG;
    		close;
    		}
    L_ANGRY:
    MES"I HATE YOU!";
    CLOSE;
    
    OnInit:
    set .knsON,0;
    end;
    
    OnClock1633: // - start event - \\
    set .knsON,1;
    end;
    
    OnClock1711: // - end event - \\
    set .knsON,0;
    end;
    }	
    
    
    
    
    
    -	script	100times	-1,{
    
    OnClock1634:
    if (.count < 1) goto L_SUM;
    end;
    
    L_SUM:
    for( .@i = 0; .@i < .size; .@i++ ){
    	killmonster .Map$[.@i],"All";
    	monster .Map$[.@i],0,0,"--ja--",.MobID,1,strnpcinfo(0)+"::OnKilled";
    }
    end;
    
    OnKilled:
    set .count,.count-50;
    end;
    
    OnInit:
    .MobID = 1785;
    setarray .Map$[0],"prontera";
    
    .size = getarraysize( .Map$ );
    end;
    }

    this script like quest and npc revenge to player who play her.

  9. i use 
    OnClock1601:
    if (.count < 1) goto L_SUM;
    end;


    it work. but when i use like this if (.count > 1) goto L_SUM; or  if (.count >= 1) goto L_SUM;. nothing happen.

     

    i just want to make if player click npc more than 100 times. monster will spawn.

    -	script	100times	-1,{
    
    OnClock1601:
    if (.count > 1) goto L_SUM;
    end;
    
    L_SUM:
    for( .@i = 0; .@i < .size; .@i++ ){
    	killmonster .Map$[.@i],"All";
    	monster .Map$[.@i],0,0,"--ja--",.MobID,1,strnpcinfo(0)+"::OnKilled";
    }
    end;
    
    OnKilled:
    set .count,.count - 50;
    end;
    
    OnInit:
    .MobID = 1785;
    setarray .Map$[0],"prontera";
    
    .size = getarraysize( .Map$ );
    end;
    }
  10. Quote

    can anyone help me put another 1 pvp solo but player only can entered 8pm-9pm map using pvp_y_1-2


    you can try this 

     

    -	script	8to9pm	-1,{
    
    OnClock2000:
    set $@StartNow,1;
    end;
    
    OnClock2100:       
    set $@StartNow,0;
    end;
    }
    
    prontera,150,150,4	script	Player vs Player	871,{
    mes "[PvP Warper]";
    mes "Which arena do you want to go to?";
    switch(select("PVP SOLO["+getmapusers("pvp_y_1-2")+"]")){
    	case 1:
    	if($@StartNow) {
    	if( getmapusers( "pvp_y_1-2" ) > 1) goto L_Full;
    		next;
    		warp "pvp_y_1-2",0,0;
    		end;
    		}else{
    		next;
    		mes"8PM TO 9PM ONLY";
    		end;
    		}
    
    L_Full:
    	mes "Room Full, Please wait";
    	end;
    		}
    		}

     

  11. 43 minutes ago, WhiteEagle said:

    Here, that's the structure:
    IconName = "ico_nq.bmp", // Normal Quest
    IconName = "ico_nj.bmp", // Job Quest
    IconName = "ico_gq.bmp", // Guide Quest

    
    	[1238] = {
    		Title = "Shop guide",
    		IconName = "ico_nq.bmp",
    		Description = {
    			"The first quest. Experience about the use of shop. After buying one Red Potion, report to Leonie.",
    		},
    		Summary = "Talk to Leonie",
    		NpcSpr = "4_M_THAIONGBAK",
    		NpcNavi = "com_d02_i",
    		NpcPosX = 241,
    		NpcPosY = 255,
    		RewardEXP = "4300000",
    		RewardJEXP = "2800000",
    		RewardItemList = {
    		{
    			ItemID = 501,
    			ItemNum = 1
    		}}
    	},

     

    work!  thank you.
    but can be multi item ?

  12. 12 hours ago, WhiteEagle said:

     

    You can try this :
    RewardEXP = "1000",
    RewardJEXP = "1000",
    RewardITEM = "512",

     

    May I ask where you found the translated quest info?

    same. nothing happen with RewardItem.

    maybe like this

    		RewardItemList = {
    
    			},

    i dont know how.

    here translated quest

    OngoingQuestInfoList.lub

  13. [70001] = {
    		Title = "Welcome to Ragnarok Online!",
    		NpcSpr = "4_F_01",
    		Description = {
    			"Spoke with Father Mareusis to become an Acolyte. He ordered you to visit ^000077Father Rubalkabara^000000, who has been Practicing Asceticism near the Relics, Northeast of Prontera City.",
    			},
    		RewardEXP = "1000",
    		RewardJEXP = "1000",
    		Summary = "Talk to Father Rubalkabara."

    How to i add monster and reward list ?

    i already try and try but nothing happen
    x371DJB.jpg

    function GetOngoingRewardInfo(questID)
    	local reward = QuestInfoList[questID].RewardItemList
    	if nil == reward then
    		return
    	end
    	for k, v in pairs(QuestInfoList[questID].RewardItemList) do
    		AddOngoingRewardInfo(questID, v.ItemID, v.ItemNum)
    	end
    end

    from  data\luafiles514\lua files\datainfo\questinfo_f.lub

×
×
  • Create New...