ZoriaRPG

SetGerNPCsTest.zs

Jan 21st, 2017
116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                                             import "std.zh"
  2.  
  3. const int MAXMAPS = 1;
  4. const int SCTLS_BASE = 100;
  5. const int SCTLS_NEXT_OFS = 10;
  6. int map = 1; int screen = 0;
  7.  
  8. global script a{
  9. void run(){
  10.     int s_demo[]="Demo - Test Get/SetScreenEnemy()";
  11.     int s_scr[]="Screen:"; int s_map[]="Map:";
  12.     int s_ctls[]="Press Ex1, Ex2 to change Map ID";
  13.     int s_ctls2[]="Press Ex3/Ex4 to change Screen ID";
  14.     int s_ctls3[]="Press R to change NPCs";
  15.     int s_ctls4[]="Press L to Trace NPCs to Console";
  16.     //int map = 1;
  17.     //int screen;
  18.     while(true){
  19.        
  20.         if ( Link->PressEx1 ) map = ( vbound(map-1, 1, MAXMAPS) );
  21.         if ( Link->PressEx2 ) map = ( vbound(map+1, 1, MAXMAPS) ) ;
  22.         if ( Link->PressEx3 ) screen = ( vbound(screen-1, 0, 0x87) );
  23.         if ( Link->PressEx4 ) screen = ( vbound(screen+1, 0, 0x87) );
  24.         if ( Link->PressL ) {
  25.             for ( int q = 0; q < 10; q++ ) Trace(Game->GetScreenEnemy(map,screen,q));
  26.         }
  27.         if ( Link->PressR ) {
  28.             //for ( int q = 0; q < 10; q++ ) {
  29.                 Game->SetScreenEnemy(1,0,0, 20);
  30.             //}
  31.         }
  32.         Screen->DrawInteger(6, 60, 30, 0, 0x01, -1, -1, -1, map, 0, 128);
  33.         Screen->DrawInteger(6, 60, 50, 0, 0x01, -1, -1, -1, screen, 0, 128);
  34.    
  35.         Screen->DrawString(6, 0, 50, 0, 0x01, -1, 0, s_scr, 128);
  36.         Screen->DrawString(6, 0, 30, 0, 0x01, -1, 0, s_map, 128);
  37.    
  38.         Screen->DrawString(6, 0, 0, 0, 0x01, -1, 0, s_demo, 128);
  39.  
  40.         Screen->DrawString(6, 0, SCTLS_BASE, FONT_LA, 0x01, -1, 0, s_ctls, 128);
  41.         Screen->DrawString(6, 0, SCTLS_BASE+SCTLS_NEXT_OFS, FONT_LA, 0x01, -1, 0, s_ctls2, 128);
  42.         Screen->DrawString(6, 0, SCTLS_BASE+(SCTLS_NEXT_OFS*2), FONT_LA, 0x01, -1, 0, s_ctls3, 128);
  43.         Screen->DrawString(6, 0, SCTLS_BASE+(SCTLS_NEXT_OFS*3), FONT_LA, 0x01, -1, 0, s_ctls4, 128);
  44.    
  45.    
  46.         Waitdraw(); Waitframe();
  47.     }
  48. }}
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×