Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. in red must be , the rest is right.
  2. *Facepalm* You're right it will work !
  3. The effect is the same : you get an item randomly. No, just add in this setarray .@reward, 20103, 60, 20104, 10, 20105, 10, 20106, 10, 20106, 5, 20107, 5; <item ID>, <rate> The total can be above 100 Btw I made a mistake in the previous function. I edited the previous post, please take the new function.
  4. Guild ranker by : - count break emp - number of member in the guild - number of castle - number of bad word they said - number of assassin cross in the guild... => Please be more specific. Idem for auto reward.
  5. function script box____ { setarray .@reward, 20103, 60, 20104, 10, 20105, 10, 20106, 10, 20106, 5, 20107, 5; set .@size, getarraysize( .@reward ); for( set .@i, 1; .@i < .@size; .@i += 2 ) { .@percent[.@i] = .@total + .@reward[.@i]; .@total += .@reward[.@i]; } .@r = rand( .@total +1 ); for( set .@i, 1; .@i < .@size; .@i += 2 ) if( .@percent[.@i] > .@r ) break; getitem .@reward[ .@i-1 ], 1; end; } EDIT : Fix a mistake. 25620,3D_Glasses_Box,Box of Minion,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "box____"; },{},{}
  6. @joelolopez is not an array. prontera,150,145,5 script register 56,{ function isreq; callsub L_check; if( select( "Register ?", "Informations" ) == 2 ) { mes "info blablabla fill it as your content"; close; } if( !getcharid(1) ) { mes "you're not in a party"; close; } else if( .party1 == getcharid(1) || .party2 == getcharid(1) ) { mes "you're already on my list"; close; } getpartymember getcharid(1); if( $@partymembercount != .count_req || !instance_check_party( getcharid(1),.count_req ) ) { mes "you need "+ .count_req +" players online in your party"; close; } callsub L_check; if( !.party2 ) .party2 = getcharid(1); else .party1 = getcharid(1); dispbottom "your party is now on my list"; if( !.party1 || !.party2 ) end; .start = 1; warpparty .map_event$, 0,0, .party1; warpparty .map_event$, 0,0, .party2; initnpctimer; end; OnPCKillEvent: .@self = getcharid(3); .@killed = killedrid; .@is_reg = isreq(); attachrid( .@killed ); if( !isreq() ) end; getpartymember getcharid(1),1; getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid( $@partymemberaid[.@i] ); sleep2 1; if( strcharinfo(3) == .map_event$ ) { .@is_online += 1; if( Hp < 1 ) .@count += 1; } } } if( .@is_online != .@count ) { attachrid( .@killed ); sleep2( .wait * 1000 ); atcommand "@alive"; end; } else if( !.@is_reg ) end; attachrid( .@self ); sleep2 2; announce "team "+ getpartyname( getcharid(1) ) +" win the event !", 0; getpartymember getcharid(1); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { getmapxy .@map$, .@x, .@y, 0, $@partymembername$[.@i]; if( .@map$ == .map_event$ ) { for( .@j = 0; .@j < .size_reward; .@j++ ) getitem .item_id[.@j], .item_count[.@j], $@partymemberaid[.@i]; } } stopnpctimer; sleep 3000; OnTimer300000: // 5 min then end of event .start = .party1 = .party2 = 0; mapwarp .map_event$,"prontera",0,0; end; L_check: if( .start ) end; else if( getpartyname( .party1 ) == "null" ) .party1 = 0; else if( getpartyname( .party2 ) == "null" ) .party2 = 0; else if( getpartyname( .party1 ) != "null" ) { getpartymember .party1; if( $@partymembercount != .count_req || !instance_check_party( .party1,.count_req ) ) .party1 = 0; } else if( getpartyname( .party2 ) != "null" ) { getpartymember .party2; if( $@partymembercount != .count_req || !instance_check_party( .party2,.count_req ) ) .party2 = 0; } return; function isreq { if( strcharinfo(3) == .map_event$ && .start && ( getcharid(1) == .party1 || getcharid(1) == .party2 ) ) return 1; return 0; } OnInit: .map_event$ = "geffen"; // your event map .count_req = 1; // count required in the party to start the event .wait = 20; // time in secs to be rezu setarray .item_id, 501; // item id array gained setarray .item_count, 1; // item count array gained - must be same size of .item_id array // Don't touch this part // --------------------- .size_reward = getarraysize( .item_id ); setmapflag .map_event$,mf_noteleport; setmapflag .map_event$,mf_nowarp; setmapflag .map_event$,mf_nowarpto; setmapflag .map_event$,mf_nomemo; setmapflagnosave .map_event$,"prontera",0,0; setmapflag .map_event$,mf_partylock; setmapflag .map_event$,mf_pvp; end; } I include a reward array in this one. I add a information menu in the script of this post. But you must fill out... it's your homework xD
  7. Try this Stalk There isn't other possibility to double exp/drop for 1 player by npc script than sc_expboost
  8. Use Mapflag#restricted.txt with db/skill_nocast_db.txt setmapflag "map_name",mf_restricted,<zone>;
  9. Refer autospell bonus5 bAutoSpell,x,y,n,t,i; n/10% chance to cast skill x of level y when attacking (supports skill names) t: Trigger criteria: BF_SHORT: Trigger on melee attack BF_LONG: Trigger on ranged attack ( Default: BF_SHORT+BF_LONG ) BF_WEAPON: Trigger on weapon skills BF_MAGIC: Trigger on magic skills BF_MISC: Trigger on misc skills ( Default: BF_WEAPON ) BF_NORMAL: Trigger on normal attacks. BF_SKILL: Trigger on skills (Default: BF_SKILL if type is BF_MISC or BF_MAGIC, BF_NORMAL if type is BF_WEAPON) i: 0=cast on self 1=cast on enemy, not on self 2=use random skill lv in [1..y] 3=1+2 (random lv on enemy)
  10. CREATE TABLE IF NOT EXISTS `pvpladder` ( `char_id` int(11) unsigned NOT NULL default '0', `kills` int(11) unsigned NOT NULL default '0', `deaths` int(11) unsigned NOT NULL default '0', `streaks` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM;
  11. - check the logincount in login table (how much the account connect in game) - if the logincount is more than 1, the script end otherwise.. - get the player IP - count this IP in the loginlog table. If the IP count is more than 1, the script end otherwise.. - give a reward - count the distinct IP in loginlog table. If there is a multiple of 100 distinct IP => reward - update the logincount in login table to 2
  12. Lighta already made the update for some customs translations in r17296. French translation is already up to date.
  13. Because of the mapflag pvp_noparty on your event map. Check your conf/mapflag/pvp_noparty.txt, by default this mapflag is enabled on guild_vs1
  14. The problem was because of if (.@i<7) { but .@i value for holy element in the menu was 7 -> Must be if (.@i<8) {
  15. Then change the setting for your event map here : OnInit: .map_event$ = "geffen"; // your event map geffen -> guild_vs1 Change the xY for party 1 and 2 in (instead of 0,0 ) warpparty .map_event$, 0,0, .party1; warpparty .map_event$, 0,0, .party2;
  16. I edited my previous post for 3ceam.
  17. @joelolopez I totally mess this part.. thanks ! prontera,150,145,5 script register 56,{ function isreq; callsub L_check; select( "Register ?" ); if( !getcharid(1) ) { mes "you're not in a party"; close; } else if( .party1 == getcharid(1) || .party2 == getcharid(1) ) { mes "you're already on my list"; close; } getpartymember getcharid(1); if( $@partymembercount != .count_req || !instance_check_party( getcharid(1),.count_req ) ) { mes "you need "+ .count_req +" players online in your party"; close; } callsub L_check; if( !.party2 ) .party2 = getcharid(1); else .party1 = getcharid(1); dispbottom "your party is now on my list"; if( !.party1 || !.party2 ) end; .start = 1; warpparty .map_event$, 0,0, .party1; warpparty .map_event$, 0,0, .party2; initnpctimer; end; OnPCKillEvent: .@self = getcharid(3); .@killed = killedrid; .@is_reg = isreq(); attachrid( .@killed ); if( !isreq() ) end; getpartymember getcharid(1),1; getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid( $@partymemberaid[.@i] ); sleep2 1; if( strcharinfo(3) == .map_event$ ) { .@is_online += 1; if( Hp < 1 ) .@count += 1; } } } if( .@is_online != .@count ) { attachrid( .@killed ); sleep2( .wait * 1000 ); atcommand "@alive"; end; } else if( !.@is_reg ) end; attachrid( .@self ); sleep2 2; announce "team "+ getpartyname( getcharid(1) ) +" win the event !", 0; getpartymember getcharid(1); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { getmapxy .@map$, .@x, .@y, 0, $@partymembername$[.@i]; if( .@map$ == .map_event$ ) getitem .item_id, .item_count, $@partymemberaid[.@i]; } stopnpctimer; sleep 3000; OnTimer300000: // 5 min then end of event .start = .party1 = .party2 = 0; mapwarp .map_event$,"prontera",0,0; end; L_check: if( .start ) end; else if( getpartyname( .party1 ) == "null" ) .party1 = 0; else if( getpartyname( .party2 ) == "null" ) .party2 = 0; else if( getpartyname( .party1 ) != "null" ) { getpartymember .party1; if( $@partymembercount != .count_req || !instance_check_party( .party1,.count_req ) ) .party1 = 0; } else if( getpartyname( .party2 ) != "null" ) { getpartymember .party2; if( $@partymembercount != .count_req || !instance_check_party( .party2,.count_req ) ) .party2 = 0; } return; function isreq { if( strcharinfo(3) == .map_event$ && .start && ( getcharid(1) == .party1 || getcharid(1) == .party2 ) ) return 1; return 0; } OnInit: .map_event$ = "geffen"; // your event map .count_req = 1; // count required in the party to start the event .wait = 20; // time in secs to be rezu .item_id = 501; // item id gained .item_count = 1; // item count gained setmapflag .map_event$,mf_noteleport; setmapflag .map_event$,mf_nowarp; setmapflag .map_event$,mf_nowarpto; setmapflag .map_event$,mf_nomemo; setmapflagnosave .map_event$,"prontera",0,0; setmapflag .map_event$,mf_partylock; setmapflag .map_event$,mf_pvp; end; } Now those who leave the event map are not in the killed list + can't gain a reward. No don't touch the map name in the mapflag. Just change the setting : .map_event$ = "geffen"; // your event map .count_req = 1; // count required in the party to start the event .wait = 20; // time in secs to be rezu .item_id = 501; // item id gained .item_count = 1; // item count gained
  18. - script swdghfgj -1,{ OnPCLoginEvent: // Check if already log in // ----------------------- query_sql "SELECT `logincount` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@logincount; if( .@logincount > 1 ) end; // Count account with the same ip xx.xx.xx.* // ----------------------------------------- sscanf( getcharip(), "%d.%d.%d.%d", .@a, .@b, .@c, .@d ); query_logsql "SELECT COUNT(`ip`) FROM `loginlog` WHERE `ip` LIKE '%"+ .@a +"."+ .@b +"."+ .@c +".%'", .@count; if( .@count == 1 ) { #CASHPOINTS = #CASHPOINTS +100; // gain for newbie dispbottom "Here a reward for newbie."; dispbottom "Gained : 100 Cashpoints. Total: "+ #CASHPOINTS +" Cashpoints"; query_logsql "SELECT COUNT(DISTINCT `ip`) FROM `loginlog`", .@count_ip; if( .@count_ip / 100 != $count_distinct ) { $count_distinct = .@count_ip / 100 ; dispbottom "Here a reward for being the "+ $count_distinct +"00th players !"; #CASHPOINTS = #CASHPOINTS +100; // gain each 100 distinct ip dispbottom "Gained : 100 Cashpoints. Total: "+ #CASHPOINTS +" Cashpoints"; } } query_sql "UPDATE `login` SET `logincount` = '2' WHERE `account_id` = '"+ getcharid(3) +"'"; end; } @Capuche You can use a bug exploit in the previous script. I edited it. (I made a challenge vs myself xP)
  19. @Pastkie nowarp mapflag won't solve the problem since it's about log out after some time. With just script npc : - script jono -1,{ OnPCLogoutEvent: if( getmapflag( strcharinfo(3),mf_pvp ) && getgmlevel() < 5 ) atcommand "@mute 1 "+ strcharinfo(0); end; } Mute the player for 1 min if he log out in pvp map (don't forget to add a npc to leave the pvp).
  20. - script swdghfgj -1,{ OnPCLoginEvent: // Check if already log in // ----------------------- query_sql "SELECT `logincount` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@logincount; if( .@logincount > 1 ) end; // Count account with the same ip xx.xx.xx.* // ----------------------------------------- sscanf( getcharip(), "%d.%d.%d.%d", .@a, .@b, .@c, .@d ); query_logsql "SELECT COUNT(`ip`) FROM `loginlog` WHERE `ip` LIKE '%"+ .@a +"."+ .@b +"."+ .@c +".%'", .@count; if( .@count == 1 ) { dispbottom "Here a reward for newbie."; // getitem 501, 1; #CASHPOINTS = #CASHPOINTS +100; } query_sql "UPDATE `login` SET `logincount` = '2' WHERE `account_id` = '"+ getcharid(3) +"'"; end; } Check the log count and if an other account have the same ip. Only works with new account/IP.
  21. Server side. item_db.txt ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script } ID,Name card,Name card,6,20,,10,,,,,,,,Localisation,,,,,{},{},{} Put an unique ID, a name not necessarily unique and the localisation ( nb. where you insert the card) For Localisation : Client side. System/itemInfo.lub data/cardprefixnametable.txt for prefix equipment name when you insert your card in equipment (optionnal) data/num2cardillustnametable.txt if you want an illustration of your card (optionnal) data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/cardbmp/ to put the illustration (optionnal) itemInfo.lub Just follow the typo. Change the Display name, the description for identified/unindentified item. That's all. cardprefixnametable.txt Add in your file a line following the typo Card ID#Prefix# num2cardillustnametable.txt Add in your file a line following the typo Card ID#Name in cardbmp# cardbmp/ Add your illustration in bmp format 300x400
  22. You have a wrong typo for a bonus in item_db.txt or item_db2.txt Check your custom item script bonus. bonus X, Y;
  23. data\luafiles514\lua files\skillinfoz\skillinfolist.lua [SKID.NPC_VAMPIRE_GIFT] = { "NPC_VAMPIRE_GIFT"; SkillName = "Vampire Gift", MaxLv = 10, SpAmount = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, bSeperateLv = false, AttackRange = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, will display the name's skill Vampire Gift. Change it as your content.
  24. One of your player already make a homunculus S ? if not just disable the npc to evolve the homunc : trunk/npc/re/quests/homun_s.txt
×
×
  • Create New...