Jump to content
  • 0

Question

Posted (edited)

Hi all rAthena members i need you help with this script.

this script have some dungeons blocked

 

ejem: if you like warp to payon dungeon 01 need end a mini quest you need give to a npc skel bone and broken egg shell

when you ends the warp to the dungeon is unlocked only 1 character

i like unlock the dungeon for a count . if 1 char ended a quest, all account character have a permission to warp a same dungeon

 

i like change the block warp 1 character > to all account character

Sorry for my bad english

 

 

loki_warper.txt

Edited by williamII

7 answers to this question

Recommended Posts

Posted

#lastwarp and #lastwarp_array only store the last warp info.

The unlocked status for each dungeon is stored in 50 state_*dun_***** variables.

Search ".@stateName$" (52 hits in 1 file)
  D:\Users\Brian\Desktop\loki_warper.txt (52 hits)
	Line 664:     	set .@state, getd(.@stateName$);
	Line 733: 							setd .@stateName$,.@playerChoice;
	Line 1097: 		set .@stateName$,"state_gdun_ald";
	Line 1108: 		set .@stateName$,"state_gdun_gef";
	Line 1119: 		set .@stateName$,"state_gdun_prt";
	Line 1130: 		set .@stateName$,"state_gdun_pay";
	Line 1160: 		set .@stateName$,"state_dun_abyss";
	Line 1178: 		set .@stateName$,"state_dun_amatsu";
	Line 1195: 		set .@stateName$,"state_dun_abyss";
	Line 1211: 		set .@stateName$,"state_dun_ayothaya";
	Line 1225: 		set .@stateName$,"state_dun_beach";
	Line 1237: 		set .@stateName$,"state_dun_clock";
	Line 1270: 		set .@stateName$,"state_dun_coal";
	Line 1288: 		set .@stateName$,"state_dun_culvert";
	Line 1308: 		set .@stateName$,"state_dun_abbey";
	Line 1329: 		set .@stateName$,"state_dun_dim";
	Line 1345: 		set .@stateName$,"state_dun_einbroch";
	Line 1359: 		set .@stateName$,"state_dun_gefenia";
	Line 1379: 		set .@stateName$,"state_dun_geffen";
	Line 1399: 		set .@stateName$,"state_dun_glast";
	Line 1452: 		set .@stateName$,"state_dun_gonryun";
	Line 1470: 		set .@stateName$,"state_dun_hidden";
	Line 1489: 		set .@stateName$,"state_dun_ice";
	Line 1507: 		set .@stateName$,"state_dun_juperos";
	Line 1525: 		set .@stateName$,"state_dun_kiel";
	Line 1540: 		set .@stateName$,"state_dun_biolab";
	Line 1560: 		set .@stateName$,"state_dun_louyang";
	Line 1579: 		set .@stateName$,"state_dun_nidhoggur";
	Line 1598: 		set .@stateName$,"state_dun_malaya";
	Line 1608: 		set .@stateName$,"state_dun_magma";
	Line 1623: 		set .@stateName$,"state_dun_moscovia";
	Line 1642: 		set .@stateName$,"state_dun_niflheim";
	Line 1656: 		set .@stateName$,"state_dun_odin";
	Line 1675: 		set .@stateName$,"state_dun_orc";
	Line 1690: 		set .@stateName$,"state_dun_payon";
	Line 1715: 		set .@stateName$,"state_dun_poring";
	Line 1728: 		set .@stateName$,"state_dun_pyramid";
	Line 1755: 		set .@stateName$,"state_dun_rachel";
	Line 1780: 		set .@stateName$,"state_dun_sphinx";
	Line 1804: 		set .@stateName$,"state_dun_sunken";
	Line 1819: 		set .@stateName$,"state_dun_thantaos";
	Line 1868: 		set .@stateName$,"state_dun_thor";
	Line 1887: 		set .@stateName$,"state_dun_toy";
	Line 1902: 		set .@stateName$,"state_dun_turtle";
	Line 1923: 		set .@stateName$,"state_dun_umbala";
	Line 1938: 		set .@stateName$,"state_dun_undersea";
	Line 1965: 		set .@stateName$,"state_dun_scaraba";
	Line 1982: 		set .@stateName$,"state_dun_mist";
	Line 1992: 		set .@stateName$,"state_dun_malangdo";
	Line 2004: 		set .@stateName$,"state_dun_brasilis";
	Line 2018: 		set .@stateName$,"state_dun_dewata";
	Line 2031: 		set .@stateName$,"state_dun_yggdrasil";

To change the unlocking to per-account, edit lines 664 and 733 to this:

set .@state, getd("#"+.@stateName$);
setd "#"+.@stateName$,.@playerChoice;
Then you'd also have to change the existing variables already saved in SQL ...
Posted

i like change the block warp 1 character > to all account character

I think you just have to replace all

lastwarp

 

by

#lastwarp

 

 

and

lastwarp_array

 

by

#lastwarp_array
Posted (edited)

HI!  i now change  lastwarp > #lastwarp

and  lastwarp_array > #lastwarp_array

 

the first character have a locked the payon dungeon 3 and npc can't by warp.

 

the second character now is already for warp to payon dungeon 3 and both are of same account

 

post-465-0-67213300-1363188094_thumb.png

Edited by williamII
Posted

Then you'd also have to change the existing variables already saved in SQL ...

 

Run these 2 SQL queries while your server is offline:

INSERT INTO global_reg_value (char_id,str,`value`,`type`,account_id) 
SELECT 0,CONCAT('#',global_reg_value.str),`value`,2,`char`.account_id 
FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id 
WHERE global_reg_value.account_id=0 AND global_reg_value.str LIKE 'state_%';

DELETE FROM global_reg_value WHERE str LIKE 'state_%';

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