npcwalkto not working in latest SVN | closed | |
AnnieRuru 2013-01-11 19:50:15 | [codebox]prontera,156,180,5 script kjfhskjf 100,{ unittalk getcharid(3), "move your ass fu*cker !!!"; npctalk "I don't want to move ~ because its bug wahaha"; npcwalkto 158, 180; // bug getmapxy .@map$, .@x, .@y, 1; sleep 3000; movenpc strnpcinfo(0),158,180; npctalk "but I can warp !"; sleep 3000; movenpc strnpcinfo(0), .@x, .@y; end; }[/codebox] I remember these script used to work last time http://rathena.org/board/topic/74196-walkable-and-talkable-npc/#entry155882 but right now this script command isn't working anymore I've tried reverse my SVN revision to 16980 and it work, now 17092 doesn't work | |
QQfoolsorellina 2013-01-12 00:46:08 | script was working wtih r17047 not working with [rev=17048] | |
Brian 2013-01-12 15:33:46 | Is it because that NPC sprite does not have a walking animation frame? With this script, the poring appears to walk: [codebox]prontera,155,188,0 script Tag 1002,1,1,{ if (.active) { // they clicked the npc while it was moving mes "Catch me if you can!"; close; } mes "Start a game of tag?"; if(select("Yes:No")==2 || .active) { mes "Come back soon."; close; } set .active, 1; mes "Get ready!"; close2; // randomize starting point (give the npc a headstart) do { set .@rand_x, rand(150,160); set .@rand_y, rand(180,190); getmapxy(.@map$,.@x,.@y,0); // char's current x,y } while ( distance(.@rand_x,.@rand_y,.@x,.@y) < 2 ); movenpc "Tag", .@rand_x,.@rand_y; // start moving npcspeed 90; // lower means faster npctalk "Here we go!"; while (.active) { // pick new random coordinates set .@rand_x, rand(150,160); set .@rand_y, rand(180,190); while ( !getmapxy(.@map$,.@x,.@y,1) && (.@x!=.@rand_x || .@y!=.@rand_y) ) { // keep doing 'npcwalkto' until it reaches destination npcwalkto .@rand_x,.@rand_y; sleep 250; } } end; OnTouch: // tagged the npc if (.active) { npcstop; npctalk "You win!"; set .active, 0; } end; }[/codebox] | |
malufett 2013-01-12 16:40:23 | [quote] When malufett saw kjfhskjf and knew he had been ill for a long time, he asked him, “Would you like to get well?†“I can’t, sir,†kjfhskjf said, malufett told him, “Stand up, pick up your mat, and walk!†Instantly, kjfhskjf was healed! He rolled up his sleeping mat and began walking @ [rev='17094'] ![/quote] ![]() | |
AnnieRuru 2013-01-13 14:29:59 | kjfhskjf is getting hyper after your treatment LOL ! [codebox]prontera,156,182,5 script kjfhskjf 100,{ end; OnInit: // npcspeed 150; while (1) { getmapxy .@map$, .@x, .@y, 1; while ( checkcell( .@map$, .@npc_x = .@x + rand( -5,5 ), .@npc_y = .@y + rand( -5,5 ), cell_chknopass ) ); npcwalkto .@npc_x, .@npc_y; sleep 1000; } end; // doesn't reach }[/codebox]doesn't seem right I remember it has a default speed 150 without set anything but right now, it is like having a speed with 50 ( its speed is 0 ? ) | |
malufett 2013-01-13 16:33:01 | haha.I make him the flash..hahaha I rely too much on 'status_calc_npc_' and I think I broke something... [s]ok working on it.[/s].ok done! ![]() ![]() |