-
Posts
192 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by TiMz
-
-
Script only reads the if and not the else part. Which part is written badly?
OnPCDieEvent: getmapxy .@map$,.@x,.@y,0; if ( getgroupid() > 3 || killedrid == getcharid(3)) end; else (.@map$ == "arena") { announce rid2name(killerrid)+" wins against "+strcharinfo(0)+" at pvp!",bc_all; warp "prontera",155,180; end; } end; }
-
I have a special room which @hide a player if they enter as a watcher. Except I'm not sure how to "unhide" them using an exit NPC.
I tried sc_end all but it doesn't seem to work. I also tried @hide to reverse the command which works, but now player who enters as non-watchers will be hidden as they exit the room.
Any ideas?
-
I wish I knew what to put to loop every player. Thanks for the clues though.
-
I tried doing it this way yet @hide is still being counted.
BUILDIN_FUNC(getmapusers) { const char *str; int m; str=script_getstr(st,2); if( (m=map_mapname2mapid(str))< 0){ script_pushint(st,-1); return 0; } TBL_PC *sd, *pl_sd; struct s_mapiterator* iter; iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ) if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_isinvisible(pl_sd)) continue; // skip hidden GMs (with !hide) script_pushint(st,map[m].users); return 0; }
-
Hello, it it possible to make "getmapusers" not count those using the command @hide, for both gm and normal players.
-
@Emistry Worked like a charm! Great support thank you!
-
@Emistry
Thanks for the quick response. I didn't get any errors on the console although the npc is only showing the guild name of ID 100. And nothing else.
-
@sandbox
It still doesn't show the member's position as "apple"
It now looks something like
[Fruit Clan]
apple
Name | 0 | // 0 meaning guildmaster.
-
query_sql( "SELECT `name`,`guild_id`,`position` FROM `guild_member` where guild_id = 100 LIMIT 5",.@Name$,.@gid,.@position ); mes "[ Fruit Clan ]"; mes " "; for( set .@a,0; .@a < getarraysize(.@name$); set .@a,.@a + 1) if(.@position[.@] == 0) mes "Apple"; else if(.@position[.@] == 1) mes "Orange"; mes " "+.@name$[.@a]+ " | " +.@position[.@a]+" | "; mes " "; close; }
@sandbox It doesn't appear to work.
-
Using SQL entries I instead of numbers appearing in-game I would like the value 0 appear as apple, 1 appear as grapes, 2 appear as watermelon etc etc.
mes "[ " +.@position[.@a]+" ]"); <<< This will appear as a number in-game from the guild position table. How to attach a word to the corresponding number. mes " "; close; }
-
-
Hello. Can someone help me make an NPC that will show a list of all member names of guild_id==100? Just a simple npc with just that.
Thank you!
Hoping it will look something like this.
[Poring Guild] //which is guild_id 100
Members:
Aba
Baba
Caba
-
Amazing map except that Prontera Church is missing its roof texture. The attached files only contains the missing floor tiles.
And some of the shallow water parts are not walkable while some are walkable. Was this intended?
-
I would please like to request a modified version of this script which would split up the option to choose which MvP would give points(which is already present in the script) and an option to choose what MvP kill would be announced.
Like for example:
Point list: Baphomet, Eddga
Announce list: Eddga only
Player kills: baphomet> player receives points> no announcement
Player kills: Eddga> player receives points> announce at whole server
- script Rank MvP -1,{ OnInit: // Script Configuration setarray .mobid[0],1511,1647,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646, 1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; // MvP Ids set .a, 0; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set $@top, 5; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) end; OnNPCKillEvent: // Script execution for (set .@c, 0; .@c < getarraysize(.mobid); set .@c, .@c + 1) if (killedrid == .mobid[.@c]) set .@s, 1; // If a MvP if (!.@s) end; if (.a) // If announce On announce "The user [" +strcharinfo(0) +"] has killed a [" +getmonsterinfo(killedrid,0) +"] in the map [" +strcharinfo(3) +"]",bc_blue|bc_all; set MvP, MvP + 1; callfunc ("MvPRank",MvP,strcharinfo(0)); end; } // End Script
Thank you.
-
if( mob_id == MOBID_EMPERIUM || mob_id == 1904 || mob_id == 1905 || mob_id == 2000 ){
Thank you @Emistry! I'll test it out soon.
-
There is a check in @monster that prevents you from spawning an Emperium:
if (mob_id == MOBID_EMPERIUM) { clif_displaymessage(fd, msg_txt(83)); // Monster 'Emperium' cannot be spawned. return -1; }
To allow @monster 1288, delete those lines and recompile.What's a good way to add more than just the "emperium" as restriction. What if I wanted to restrict mob id 1904, 1905, 2000 ?
-
Still no solution to seeing cloaked players using monster disguise?
-
Love the peaceful feel to it.
-
-
Decrease AGI, always seem to "skill fail" in pvp against players. But works against monsters.
-
I'm using pre-re and a SHR server. Having all stats above 99, it seems that the success rate of the skill has been messed up. It keeps failing against players but works on mobs. Is there a way to make the skill work 100% instead just like increase agi?
-
Hello @goddameit sorry to ask but how exactly can we trigger the start of this event? Clicking the npc doesn't really show anything. And I can't find a clock schedule on the script.
-
Using:
Title: Ghost's PvP System (Multi-announcer + Ladder)
The point system is being exploited by the skill grandcross and suicide. How can I prevent suicide from giving points?
-
This is the only version of the script that actually works with my svn so please bear with me. So it seems to work with no problem except that it still gives points when vending+autotrade mode.
- script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer60000: set @minute, @minute + 1; if(@minute == 20){ set @minute,0; set .@point_amt, 2; //Points to get every hour (default: 10) if(checkvending() >= 1) { dispbottom "The hourly points event haulted because you were vending."; stopnpctimer; end; } else { set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" cash points for staying in-game."; dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points"; set @consecutive_hour, @consecutive_hour + 1; } } if(@consecutive_hour == 3) { set @consecutive_hour,0; set .@cpoint_amt, 10; //Points to get for 12 Consecutive hours (default: 50) set #CASHPOINTS, #CASHPOINTS + .@cpoint_amt; dispbottom "You received "+.@cpoint_amt+" bonus cash points for playing for 1 hour."; dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points"; } stopnpctimer; initnpctimer; end; } //--End of the Script
Need help with script (if and else)
in Scripting Support
Posted · Edited by Isaiah
Basically the broadcast should happen only in the specific map when one player is killed and shouldn't broadcast when using @die.