Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| 2009-12-28, 16:47 | Random NPC |
---|
tazqi Novice
Posts : 122 Thanked : 0 Engine : Multi-Engine User Skill : Very Beginner Type : Writer
| ada gk ya script ato apalah yg bisa mbuat NPCnya beda-beda contohnya kupu-kupu nanti setiap beberapa menit grapiknya berubah dan begitu seterusnya................... |
| | | 2009-12-28, 17:02 | Re: Random NPC |
---|
yerry_great @> Moderator
Posts : 1251 Thanked : 15 Engine : Multi-Engine User Skill : Very Beginner Type : Jack of All Trades
| Wew... ngapain nyari script... pake event juga bisa... |
| | | 2009-12-28, 17:12 | Re: Random NPC |
---|
tazqi Novice
Posts : 122 Thanked : 0 Engine : Multi-Engine User Skill : Very Beginner Type : Writer
| charanya? udah tak utak atik gbisa-bisa |
| | | 2009-12-28, 17:26 | Re: Random NPC |
---|
yerry_great @> Moderator
Posts : 1251 Thanked : 15 Engine : Multi-Engine User Skill : Very Beginner Type : Jack of All Trades
| Bisa... buat NPC, trus movenya terserah (di bikin sendiri aja) Trus jalanin parallel process, Random Variable [0001] A: 1~5 Trus buat Event NPCnya tadi 5 page, setiap page contreng Variabelnya... setiap page beda"... kalo Variabel A = 1 gerakannya kemana kalo variabel A = 2 gerakannya kemana dst |
| | | 2009-12-28, 17:31 | Re: Random NPC |
---|
tazqi Novice
Posts : 122 Thanked : 0 Engine : Multi-Engine User Skill : Very Beginner Type : Writer
| kurang jelas tanpa gambar sekalian aja demonya..... ku tunggu besok kan? |
| | | 2009-12-28, 18:38 | Re: Random NPC |
---|
yerry_great @> Moderator
Posts : 1251 Thanked : 15 Engine : Multi-Engine User Skill : Very Beginner Type : Jack of All Trades
| Kalo bisa, besok... RMVX ya? hmm bisa sih cepet... Tapi kalo ga bisa aplod aku kasi tau caranya aja ya... |
| | | 2009-12-28, 19:04 | Re: Random NPC |
---|
Tamu Tamu
| WARNING GAMBARNYA GEDE neh neh saya coba jawab ya... Pertama tama Buka Event Processing Kedua buka control variable, lalu buat variable namanta random ato apalah setting Randon - 1 - 5 ato berapa ajalah Ketiga Buka conditional branbch dan setting variable random equal to 1 lalu if yes buat movementnya elsenya kosongin aja... ulangi ini 5 kalo (ato berapa random km buat contoh akhir |
| | | 2009-12-29, 13:43 | Re: Random NPC |
---|
tazqi Novice
Posts : 122 Thanked : 0 Engine : Multi-Engine User Skill : Very Beginner Type : Writer
| owww............. berarto hampir sama kya mancing....... tpi lebih enak ada demonya tinggal copas si yerry mana yah |
| | | 2009-12-29, 13:55 | Re: Random NPC |
---|
Tamu Tamu
| @tazki kayaknya gag butuh demo deh... tp sante bro nih demonya : http://www.mediafire.com/download.php?zajndknmtkf kalo ada pertanyaan tanya aja... aku berusaha jawab kok nama variablenya adalah variabel ada 5.. ya kayak sistem pancing lah... sori atas nama variablenya yg ngaco " " |
| | | 2010-01-04, 19:06 | Re: Random NPC |
---|
reijubv Kai Runes
Posts : 1476 Thanked : 33 Engine : RMVX
Awards:
| @declar gambar gde di spoiler donk Try this, NPC Generator script, by berka - Spoiler:
- Code:
-
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # NPC Generator # by berka rgss2 # www.rpgmakervx-fr.com #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Rgss 2 v 2.0 based on mithos & pipo work #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # -Instructions- # Write in an event, call a script command: # # minumum required: # [event] # compulsory ! # chara : "Actor01" # name of the charset file or: chara : rand # # and optional settings: # x : 5 # x position, random if nothing # y : 10 # y position, random if nothing # nom : "Event01" # event's name or nom: rand # c_index : 0 # charset's index # face : "Actor01" # name of the faceset file or: face : true (=> same as chara) # f_index : 0 # faceset's index # dir : 2 # event direction # type_mov:0 # movement type # vit_mov:0 # movement speed # freq_mov:0 # muvement frequency # texte:"bonjour" # dialog or texte:rand (cf. list above) # trigger:0 # event trigger # prio_type:1 # priority # script: "print @a=1" # script command # combat: 1,true,false # battle: id_monster, esc, follow if defeated # or: 0,0,1000 # gold: 0/1 (add/rem),0/1 (Const/var),amount (nbr/var_id) # objet: 2,0,0,10 # item: id,0/1 (add/rem),0/1 (Const/var),amount (nbr/var_id) # arme: 2,0,0,10 # weapon: id,0/1 (add/rem),0/1 (Const/var),amount (nbr/var_id) # bouclier: 2,0,0,10 # armor: id,0/1 (add/rem),0/1 (Const/var),amount (nbr/var_id) # suppr : true # erase this generated event #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Example: # # [event] # chara:rand # texte:rand # type_mov : 1 # #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
$characters="people" # series of charsets used to create random character # people1, people2... $chara_nbre=5 # nombre de fichiers people # Random dialogs (too lazy to translate everything) $dialogues=["Bonjour, il fait beau, nan ?","Comment allez vous ?","Partez d'ici !", "Je n'ai pas de temps Ă vous accorder !","Vous m'ennuyez...","Encore vous ?", "Ah! vous voilĂ , cher ami !","Tiens, vous semblez fatiguĂ©.","Grrrrr...", "Hors de ma vue !","Quelle belle journĂ©e!","Je me promĂšne.","Vous ĂȘtes de retour ?", "Hihihi !","Rien.","Je ne veux plus vous parler.","Que faire ?","Mais c'est „N[1] !", "Le temps change...","Vous ĂȘtes mon idole...","Dieu, que vous ĂȘtes laid !", "Vous me rappelez quelqu'un...","Vous avez l'air sournois","Salut „N[1] !", "Je ne vous fais pas confiance...","Ne m'approchez pas !","Je suis souffrant", "HĂ© ! tu la connais celle lĂ ?","Ahhahaharff...","Bonjour","Portez vous bien !", "Ravi de vous revoir","...Tousse...","Coucou!","Encore un Ă©tranger ?","Bouh !", "Je n'entends rien de ce que vous dites...","Articulez !","Parlez plus bas.", "J'ai fait route toute la journĂ©e.","Je suis d'accord.","DĂ©gage, mendiant !", "Bonjour jeune homme","...snif...","Vous attirez le malheur ici !","Entendu.", "Ne me regardez pas comme ça !","Il faut qu'on se parle...","Venez dĂ©jeuner !", "Je suis content de vous connaitre."] # in-game: $dialogues << "You are now an heroe for me !" $nom=[%w(Gw Ul Et Rh Ed Gr Dr Dw Tr Gh As Ar Ag Xor), # name generator %w(ai ia eo ui yn or ul ur a e i o u y yr ya yl), %w(th rk dd gh z l mn lyr zar gor ryn nia lia )] module Berka module Pnj_Gen Tag = "[event]" # Tag of NPC generator Separateur = ":" # Separator: cmd/value Index_Chara = 8 # Number of patterns Commandes = {:face => "[101,[@_face,@_f_index,0,2]]", # List of commands :or => "[125,[*@_or]]", :objet => "[126,[*@_objet]]", :arme => "[127,[*@_arme]]", :bouclier => "[128,[*@_bouclier]]", :combat => "[301,[0,*@_combat])]", :script => "[355,[@_script]]", :suppr => "[214]", :texte => "[401,[@_texte]]" } ProfCoord = 100 # Deep of x/y scan end end
include Berka::Pnj_Gen class Array def arand self[Kernel.rand(self.size)] end end class Object def rand? self == "?" end end class Game_Map include RPG def check_event(x,y) for event in @events.values return event.id if event.x==x&&event.y==y end return nil end def make_event(com) self.instance_variables.each{|v|eval("#{v}=nil") if v.include?("@_")} rand="?" com.each_with_index{|c,i|eval("@_#{c.first.id2name}=#{c[1]}")} set_rand set_options return if @_x.nil?||@_y.nil? if check_event(@_x,@_y).nil? @event=Event.new(@_x,@_y) com.each{|c|c=c.first ajout_cmd(*eval("#{Commandes[c]}"))if Commandes.has_key?(c) } @event.id=creerid @event.name=@_nom @event.pages.first.graphic.character_name=@_chara @event.pages.first.graphic.character_index=@_c_index @event.pages.first.graphic.direction=@_dir @event.pages.first.move_type=@_type_mov @event.pages.first.move_frequency=@_freq_mov @event.pages.first.move_speed=@_vit_mov @event.pages.first.through=@_trav @event.pages.first.trigger=@_trigger @event.pages.first.priority_type=@_prio_type @events[@event.id]=Game_Event.new(@map_id,@event) @need_refresh=true $scene.refresh_spriteset end end def set_rand rand="?" @_chara||=rand @_nom=aleatoire_nom if @_nom.nil? @_texte=$dialogues.arand if @_texte.rand? @_x,@_y=*aleatoire_pos if @_x.nil?||@_y.nil? @_pers=aleatoire_perso if @_chara.rand?||@_c_index.rand? @_face,@_f_index,@_chara,@_c_index=@_pers end end def set_options @_chara=@_pers.first if @chara.nil? @_c_index=@_pers[1] if @_c_index.nil? @_face,@_f_index = "",0 if @_face==false @_dir||=3 @_type_mov||=0 @_freq_mov||=3 @_vit_mov||=3 @_trav||=false @_trigger||=0 @_prio_type||=1 end def aleatoire_pos ProfCoord.times{ x,y=Kernel.rand(width).to_i,Kernel.rand(height).to_i next if x==$game_player.x&&y==$game_player.y (return x,y) if passable?(x,y)&&!check_event(x,y) } return nil,nil end def aleatoire_perso i=Kernel.rand(Index_Chara-1) res=$characters+(Kernel.rand($chara_nbre)+1).to_s return [res,i,res,i] end def aleatoire_nom n="#{$nom.first.arand}#{$nom[1].arand}#{$nom[2].arand}" n<<$nom[1].arand if rand(4)==1 return n end def event_name(id) @events[id].name if !@events[id].nil? end def creerid id=1 id+=1 while @events.keys.include?(id) return id end def ajout_cmd(code,param=[],i=0) cmd=EventCommand.new cmd.code,cmd.parameters,cmd.indent=code,param,i @event.pages.first.list.insert(-2,cmd) end end class Scene_Map<Scene_Base def refresh_spriteset @spriteset.dispose;@spriteset=Spriteset_Map.new end end class Game_Interpreter def eval(script) if script.include?(Tag) com=[];script.gsub!(Tag,'') list=script.split("\n") s=Separateur list.each_with_index{|e,i|e.gsub!(' '+s,s);e.gsub!(s+' ',s);f=e.split(s) com<<[f.first.to_sym,f[1]]if !f[1].nil?} $game_map.make_event(com) return end return Kernel.eval(script) end end
Thread link : http://www.rpgrevolution.com/forums/index.php?showtopic=30419 Jangan post di trid itu, necropost . . kalo mau tanya2 di sini aja . . . |
| | | | Re: Random NPC |
---|
Sponsored content
| | | | Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|